:root {
    /* Brand Colors */
    --primary: #4338ca;
    --primary-hover: #3730a3;

    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Backgrounds */
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-item: #ffffff;
    --bg-item-hover: #fdfdfd;

    /* Text */
    --text-main: #1f2937;
    --text-header: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Borders */
    --border-color: #e5e7eb;

    /* Status Backgrounds */
    --bg-success-light: #dcfce7;
    --bg-error-light: #fee2e2;
    --bg-info-light: #e0e7ff;
    --bg-warning-light: #fef3c7;

    /* Status Borders/Text */
    --text-success-dark: #166534;
    --text-error-dark: #991b1b;
    --text-info-dark: #3730a3;
    --text-warning-dark: #92400e;

    /* Alert Boxes */
    --alert-info-bg: #f4faff;
    --alert-info-border: #3b82f6;
    --alert-warning-bg: #fff3e7;
    --alert-warning-border: #f59e0b;
    --alert-error-bg: #ffebeb;
    --alert-error-border: #ef4444;
    --alert-success-bg: #e5ffee;
    --alert-success-border: #166534;
}

[data-theme="dark"] {
    --bg-body: #111827;
    --bg-card: #1f2937;
    --bg-item: #374151;
    --bg-item-hover: #4b5563;

    --text-main: #e5e7eb;
    --text-header: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-color: #374151;

    /* Adjust lighter backgrounds for dark mode to be less blinding or transparent */
    --bg-success-light: rgba(16, 185, 129, 0.2);
    --bg-error-light: rgba(239, 68, 68, 0.2);
    --bg-info-light: rgba(99, 102, 241, 0.2);
    --bg-warning-light: rgba(245, 158, 11, 0.2);

    --text-success-dark: #34d399;
    --text-error-dark: #f87171;
    --text-info-dark: #818cf8;
    --text-warning-dark: #fbbf24;

    /* Refresh Alert boxes for dark mode */
    --alert-info-bg: rgba(59, 130, 246, 0.1);
    --alert-info-border: #3b82f6;
    --alert-warning-bg: rgba(245, 158, 11, 0.1);
    --alert-warning-border: #f59e0b;
    --alert-error-bg: rgba(239, 68, 68, 0.1);
    --alert-error-border: #ef4444;
    --alert-success-bg: rgba(22, 101, 52, 0.1);
    --alert-success-border: #166534;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-body);
    margin: 0;
    padding: 20px;
    color: var(--text-main);
    transition: background 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    /* For positioning absolute elements if needed */
}

/* Header with Theme Toggle */
.app-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-item-hover);
}

/* İstatistik Kartları */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary);
}

.stat-card.global {
    border-top-color: #6366f1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-header);
    margin-top: 5px;
}

/* Ana Aksiyon Kartı */
.main-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 25px;
}

.send-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(67, 56, 202, 0.2);
}

.send-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.send-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Bildirim */
#status {
    display: none;
}

.show {
    display: block !important;
}

/* Liste */
.history-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-title);
    font-size: 0.95rem;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    background: var(--bg-item);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px 5px 1px 5px;
    border-radius: 6px;
    transition: background 0.2s;
}

.delete-btn:hover:not(:disabled) {
    background: var(--bg-error-light);
}

.delete-btn:disabled {
    color: var(--text-muted);
    cursor: default;
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-item:hover {
    background: var(--bg-item-hover);
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.item-id {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 20px;
}

.badge-success {
    background: var(--bg-success-light);
    color: var(--text-success-dark);
}

.badge-error {
    background: var(--bg-error-light);
    color: var(--text-error-dark);
}

.badge-information {
    background: var(--bg-info-light);
    color: var(--text-info-dark);
}

.badge-warning {
    background: var(--bg-warning-light);
    color: var(--text-warning-dark);
}

div.information {
    background-color: var(--alert-info-bg);
    border-left: 4px solid var(--alert-info-border);
    border-right: 4px solid var(--alert-info-border);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.875rem;
    color: var(--text-main);
}

div.warning {
    background-color: var(--alert-warning-bg);
    border-left: 4px solid var(--alert-warning-border);
    border-right: 4px solid var(--alert-warning-border);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.875rem;
    color: var(--text-main);
}

div.error {
    background-color: var(--alert-error-bg);
    border-left: 4px solid var(--alert-error-border);
    border-right: 4px solid var(--alert-error-border);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.875rem;
    color: var(--text-main);
}

div.success {
    background-color: var(--alert-success-bg);
    border-left: 4px solid var(--alert-success-border);
    border-right: 4px solid var(--alert-success-border);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.875rem;
    color: var(--text-main);
}