/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #0f0f1a; color: #e0e0e0; line-height: 1.6; }
a { color: #4fc3f7; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== KULLANICI TARAFI ===== */
.page-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.no-event {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}

.logo-area {
    text-align: center;
    margin-bottom: 16px;
}
.logo-area img {
    max-height: 60px;
    max-width: 280px;
}

.event-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e0e0e0, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Kurallar */
.rules-box {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.rules-box ul {
    list-style: none;
    padding: 0;
}
.rules-box li {
    padding: 6px 0;
    border-bottom: 1px solid #2a2a4a;
    font-size: 14px;
    color: #ccc;
}
.rules-box li:last-child { border-bottom: none; }
.rules-box li::before {
    content: '✓ ';
    color: #a855f7;
    font-weight: bold;
}

/* Video */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Sorular */
.question-block {
    background: linear-gradient(145deg, #1a1a2e, #1e1e38);
    border: 1px solid #2a2a4a;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 16px;
}
.question-block h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 14px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #12122a;
    border: 2px solid #2a2a4a;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 15px;
}
.option-label:hover {
    border-color: #6c5ce7;
    background: #1e1e3a;
}
.option-label input[type="radio"] {
    accent-color: #a855f7;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.option-label:has(input[type="radio"]:checked) {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(168,85,247,0.1));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}
.option-label input[type="radio"]:checked + span {
    color: #fff;
    font-weight: 600;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.btn-submit:hover {
    background: linear-gradient(135deg, #5b4bd5, #9333ea);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.3);
}
.btn-submit:disabled {
    background: linear-gradient(135deg, #3a3a5c, #4a4a6a);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.already-submitted {
    text-align: center;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 30px;
    color: #aaa;
    font-size: 16px;
}

.no-event {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.no-event .logo-area {
    margin-bottom: 24px;
}
.no-event .logo-area img {
    max-height: 80px;
    opacity: 0.85;
}
.no-event h2 {
    color: #aaa;
    font-size: 20px;
    font-weight: 600;
}
.btn-site-noevent {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 36px;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}
.btn-site-noevent:hover {
    color: #bbb;
    border-color: #666;
    text-decoration: none;
}

/* ===== ONAY POPUP ===== */
.confirm-modal-content {
    max-width: 400px;
}
.confirm-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.confirm-title {
    color: #fff;
    font-size: 22px;
    margin-bottom: 8px;
}
.confirm-desc {
    color: #aaa;
    font-size: 15px;
    margin-bottom: 24px;
}
.confirm-buttons {
    display: flex;
    gap: 12px;
}
.btn-confirm-yes {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}
.btn-confirm-yes:hover {
    background: linear-gradient(135deg, #5b4bd5, #9333ea);
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}
.btn-confirm-no {
    flex: 1;
    padding: 14px;
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-confirm-no:hover { background: #444; }

/* ===== VIDEO BRANDING HIDE ===== */
.video-container iframe,
.modal-video iframe {
    border: none;
}

/* ===== NICK POPUP ===== */
.nick-modal-content {
    max-width: 420px;
}
.nick-title {
    color: #fff;
    font-size: 22px;
    margin-bottom: 8px;
}
.nick-desc {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}
.nick-input {
    width: 100%;
    padding: 14px 16px;
    background: #12122a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.nick-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}
.nick-input::placeholder {
    color: #666;
}

/* ===== MODAL (POPUP) ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-logo {
    margin-bottom: 16px;
}
.modal-logo img {
    max-height: 50px;
}

.modal-answer {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    padding: 12px;
    background: #fffde7;
    color: #333;
    border-radius: 8px;
}

.modal-message {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.7;
    white-space: pre-line;
}

.modal-message.win { color: #00c853; }
.modal-message.lose { color: #ff5252; }

.modal-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}
.modal-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.modal-video:empty {
    display: none;
    padding: 0;
}

.btn-modal-close {
    padding: 12px 40px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-modal-close:hover { background: #444; }

/* ===== ADMIN TARAFI ===== */
.admin-body {
    background: #f0f2f5;
    color: #333;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.login-box h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}
.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.error-msg {
    text-align: center;
    color: #e53935;
    margin-top: 12px;
    font-size: 14px;
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-header h1 {
    font-size: 22px;
    color: #333;
}

/* Admin Buttons */
.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: #1565c0; text-decoration: none; }

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-secondary:hover { background: #d0d0d0; text-decoration: none; }

.btn-danger {
    display: inline-block;
    padding: 10px 20px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.btn-danger:hover { background: #c62828; text-decoration: none; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.admin-table th {
    background: #f5f5f5;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}
.admin-table td {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.admin-table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-active {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-inactive {
    display: inline-block;
    padding: 3px 10px;
    background: #fafafa;
    color: #999;
    border-radius: 12px;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    background: #fff;
    border-radius: 10px;
}

/* Admin Form */
.admin-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #1976d2;
}
.form-group small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1976d2;
}

/* Question Cards (Admin) */
.question-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.question-card.new-question {
    border: 2px dashed #1976d2;
    background: #f8faff;
}
.question-card h3 {
    margin-bottom: 16px;
    color: #1976d2;
    font-size: 16px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.option-row input[type="radio"] {
    accent-color: #00c853;
    width: 16px;
    height: 16px;
}
.option-row input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

/* Stats */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.stat-card {
    flex: 1;
    min-width: 140px;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1976d2;
}
.stat-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Stat Card Variants */
.stat-card-success .stat-num { color: #2e7d32; }
.stat-card-success { border-left: 3px solid #2e7d32; }
.stat-card-danger .stat-num { color: #c62828; }
.stat-card-danger { border-left: 3px solid #c62828; }

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    background: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.filter-tabs {
    display: flex;
    gap: 6px;
}
.filter-tab {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    text-decoration: none;
    transition: all 0.2s;
}
.filter-tab:hover {
    background: #e8e8e8;
    text-decoration: none;
}
.filter-tab.active {
    background: #1976d2;
    color: #fff;
}
.filter-tab.filter-correct.active {
    background: #2e7d32;
}
.filter-tab.filter-wrong.active {
    background: #c62828;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-input {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    width: 220px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: #1976d2;
}

/* Table Info */
.table-info {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    padding-left: 4px;
}

/* Badge tweaks */
.badge-inactive {
    color: #c62828;
    background: #fce4ec;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .admin-header { flex-direction: column; align-items: flex-start; }
    .admin-table td, .admin-table th { padding: 8px 10px; font-size: 12px; }
    .admin-table .actions { flex-direction: column; }
    .stats-row { flex-direction: column; }
    .modal-content { padding: 20px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-tabs { justify-content: center; }
    .search-form { flex-wrap: wrap; }
    .search-input { width: 100%; flex: 1; }
}
