/* Genel Sayfa Stilleri */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    padding: 20px 30px;
    background-color: #f0f2f5; /* Açık gri arkaplan */
    color: #333;
    line-height: 1.6;
    margin: 0; /* Body kenar boşluğunu sıfırla */
}

h1 {
    color: #1e3a8a; /* Koyu Mavi */
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: #1c449b; /* Biraz daha açık mavi */
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e7eb; /* Açık gri çizgi */
    padding-bottom: 8px;
}

h3 {
    color: #1e40af; /* Orta mavi */
    margin-top: 20px;
    margin-bottom: 15px;
}

h4 {
    color: #374151; /* Koyu gri */
    margin-top: 15px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #4b5563; /* Orta gri */
}

strong {
    color: #1e3a8a;
    font-weight: 600; /* Biraz daha kalın */
}

hr {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e5e7eb; /* Açık gri çizgi */
}

/* Konteyner ve Bölüm Stilleri */
#login-section,
#admin-controls,
#token-section,
.control-section {
    background-color: #ffffff; /* Beyaz */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); /* Hafif gölge */
    margin-bottom: 25px;
    width: 100%;
    max-width: 750px; /* Orta genişlik */
    box-sizing: border-box;
    margin-left: auto; /* Ortalamak için */
    margin-right: auto; /* Ortalamak için */
}

.control-section {
    padding: 20px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #eef2ff; /* Çok açık mavi */
    border-radius: 6px;
}

.user-info span {
    font-weight: 500;
    color: #3730a3; /* Lacivert */
}

.event-selector-container {
    display: flex;
    gap: 10px; /* Elemanlar arası boşluk */
    align-items: center;
    margin-bottom: 10px;
}

#event-selector {
    flex-grow: 1; /* Kalan alanı doldur */
    padding: 10px;
    border: 1px solid #d1d5db; /* Gri kenarlık */
    border-radius: 6px;
    font-size: 14px;
}

.status-display {
    background-color: #f3f4f6; /* Çok açık gri */
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.status-display p {
    margin: 5px 0;
    font-size: 0.9em;
}

.attendee-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9fafb;
}
.attendee-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.attendee-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 0.9em;
}
.attendee-list li:last-child {
    border-bottom: none;
}

/* Butonlar */
button {
    padding: 10px 18px; /* Biraz daha kompakt */
    margin: 5px; /* Boşlukları azalt */
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #2563eb; /* Mavi */
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

button:hover:not(:disabled) {
    background-color: #1d4ed8; /* Hover */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

button:active:not(:disabled) {
    transform: translateY(1px); /* Tıklama efekti */
}

button:disabled {
    background-color: #e5e7eb; /* Pasif gri */
    color: #9ca3af; /* Pasif metin rengi */
    cursor: not-allowed;
    box-shadow: none;
}

button.logout-button { background-color: #ef4444; } /* Kırmızı */
button.logout-button:hover:not(:disabled) { background-color: #dc2626; }

button.secondary-button { background-color: #6b7280; } /* Gri */
button.secondary-button:hover:not(:disabled) { background-color: #4b5563; }

button.cancel-button { background-color: #f97316; } /* Turuncu */
button.cancel-button:hover:not(:disabled) { background-color: #ea580c; }

#token-output button { background-color: #10b981; } /* Yeşil */
#token-output button:hover:not(:disabled) { background-color: #059669; }

/* Token Çıktı Alanı */
#token-output label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

#token-output textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85em;
    resize: vertical; /* Dikeyde boyutlandırılabilir */
    background-color: #f9fafb;
    margin-bottom: 10px;
    min-height: 100px;
}

/* Mesaj Stilleri */
.info-message { color: #059669; font-size: 0.9em; margin-top: 8px; }
.success-message { color: #16a34a; font-size: 0.9em; font-weight: 500; margin-top: 8px; background-color: #dcfce7; padding: 8px 12px; border-radius: 4px; border: 1px solid #86efac; display: inline-block;}
.error-message { color: #dc2626; font-size: 0.9em; font-weight: 500; margin-top: 8px; background-color: #fee2e2; padding: 8px 12px; border-radius: 4px; border: 1px solid #fca5a5; display: inline-block;}

/* Yükleme Göstergesi */
#loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-weight: 500;
    color: #1e40af;
}

.spinner {
    border: 4px solid #f3f4f6; /* Light grey */
    border-top: 4px solid #3b82f6; /* Blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================================= */
/*     SORU EDİTÖRÜ MODAL STİLLERİ (YENİ)  */
/* ======================================= */
.modal {
    position: fixed;
    z-index: 1000; /* Diğer elemanların üzerinde */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* İçerik taşarsa kaydırma çubuğu */
    background-color: rgba(0, 0, 0, 0.6); /* Yarı saydam siyah arkaplan */
    display: flex; /* flex ile ortalama */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Otomatik ortalama */
    padding: 25px 30px;
    border: 1px solid #d1d5db;
    width: 85%; /* Genişlik */
    max-width: 700px; /* Maksimum genişlik */
    border-radius: 8px;
    position: relative; /* Close butonu için */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-height: 90vh; /* Maksimum yükseklik */
    display: flex;
    flex-direction: column; /* Dikey düzen */
}

.modal-content h2 {
    margin-top: 0;
    text-align: center;
}

#question-list-container {
    overflow-y: auto; /* Liste taşarsa kaydırılabilir yap */
    flex-grow: 1; /* Kalan yüksekliği doldur */
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    padding: 10px;
    min-height: 150px; /* Minimum yükseklik */
    background-color: #f9fafb;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.question-item {
    border: 1px solid #e5e7eb;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.question-item div {
    flex-grow: 1;
    margin-right: 10px;
}

.question-item button {
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.85em;
    cursor: pointer;
    flex-shrink: 0; /* Butonların küçülmesini engelle */
}
.question-item button.delete-button { /* Özel stil */
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fca5a5;
}
.question-item button.delete-button:hover {
     background-color: #fecaca;
     border-color: #f87171;
}


/* Soru Ekleme/Düzenleme Formu */
#add-edit-question-form {
    border: 1px solid #d1d5db;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
    background-color: #f9fafb;
}

#add-edit-question-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

#add-edit-question-form textarea,
#add-edit-question-form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

#add-edit-question-form textarea {
    min-height: 60px;
    resize: vertical;
}

.option-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    background-color: #fff; /* Seçenek arkaplanı */
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.option-input-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.option-input-group label {
    margin-bottom: 0; /* Alt boşluğu kaldır */
    margin-right: 5px;
    font-weight: normal;
    width: 20px; /* Harf için yer */
}

.option-input-group input[type="text"] {
    flex-grow: 1; /* Kalan alanı doldur */
    margin-bottom: 0; /* Alt boşluğu kaldır */
    padding: 8px; /* Daha küçük padding */
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

/* Yardımcı Stiller */
.event-id-display {
    font-weight: bold;
    background-color: #e0e7ff;
    padding: 2px 6px;
    border-radius: 4px;
    color: #3730a3;
    font-family: monospace;
}

.leaderboard-list {
    max-height: 300px; /* veya istediğiniz bir yükseklik */
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9fafb;
}
.leaderboard-list table {
    width: 100%;
    border-collapse: collapse;
}
.leaderboard-list th, .leaderboard-list td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}
.leaderboard-list th {
    background-color: #eef2ff;
    font-weight: 600;
}
.leaderboard-list tr:nth-child(even) {
    background-color: #ffffff;
}
