/* ===========================
   RESET & BASE
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    padding: 25px 15px 50px;
    color: #ffffff;
}

/* ===========================
   CONTAINER
=========================== */
.container {
    max-width: 680px;
    margin: 0 auto;
}

/* ===========================
   HEADER
=========================== */
.header {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeDown 0.6s ease;
}

h1 {
    font-size: 2rem;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    animation: glow 2s ease-in-out infinite alternate;
    margin-bottom: 8px;
}

h2 {
    font-size: 1.5rem;
    color: #ff6b6b;
    margin-bottom: 15px;
    text-align: center;
}

h3 {
    font-size: 1.1rem;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255,107,107,0.4); }
    to   { text-shadow: 0 0 30px rgba(255,107,107,1); }
}

@keyframes fadeDown {
    from { opacity:0; transform: translateY(-20px); }
    to   { opacity:1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity:0; transform: translateY(10px); }
    to   { opacity:1; transform: translateY(0); }
}

.subtitle {
    color: #a8b2d8;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* ===========================
   QUIZ INFO CARDS (HOME)
=========================== */
.quiz-info-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.info-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 140px;
    font-size: 0.85rem;
    color: #ccd6f6;
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,107,107,0.4);
}

.info-icon {
    font-size: 1.8rem;
}

.badge {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===========================
   CARD
=========================== */
.card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 30px 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease;
}

/* ===========================
   LABELS
=========================== */
label {
    display: block;
    color: #ccd6f6;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 18px;
    margin-bottom: 7px;
}

/* ===========================
   INPUTS
=========================== */
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.97rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    margin-top: 0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff6b6b;
    background: rgba(255,255,255,0.1);
}

select option {
    background: #1a1a2e;
    color: #fff;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===========================
   BUTTONS
=========================== */
.main-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 22px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
}

.main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,107,0.45);
}

.main-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.danger-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #ff4444, #c0392b);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.danger-btn:hover { transform: translateY(-2px); }

.logout-btn {
    padding: 10px 18px;
    background: rgba(255,255,255,0.1);
    color: #ccd6f6;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover { background: rgba(255,255,255,0.18); }

/* ===========================
   ACTION BUTTONS (RESULTS)
=========================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.review-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108,92,231,0.4);
}

.retry-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.retry-btn:hover { transform: translateY(-2px); }

.home-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.08);
    color: #ccd6f6;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.home-btn:hover { background: rgba(255,255,255,0.15); }

.other-quiz-btn {
    width: 100%;
    padding: 13px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.other-quiz-btn:hover { transform: translateY(-2px); }

/* ===========================
   TOP BAR (QUIZ PAGE)
=========================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.player-tag {
    color: #ccd6f6;
    font-weight: 600;
    font-size: 0.9rem;
}

.score-tag {
    color: #ffd32a;
    font-weight: 800;
    font-size: 0.95rem;
}

/* ===========================
   QUIZ TITLE
=========================== */
.quiz-title {
    text-align: center;
    margin-bottom: 12px;
}

/* ===========================
   PROGRESS
=========================== */
.progress-wrap {
    margin-bottom: 15px;
}

.progress-bar-container {
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd32a);
    border-radius: 50px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    color: #a8b2d8;
    font-size: 0.82rem;
    text-align: right;
    margin-top: 5px;
}

/* ===========================
   QUESTION
=========================== */
.q-number {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.question-text {
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.65;
    margin-bottom: 20px;
    font-weight: 500;
}

/* ===========================
   OPTIONS
=========================== */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 15px;
}

.option-btn {
    width: 100%;
    padding: 13px 18px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 11px;
    color: #ccd6f6;
    font-size: 0.97rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s;
    font-family: inherit;
    margin-top: 0;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255,107,107,0.15);
    border-color: #ff6b6b;
    color: #fff;
    transform: translateX(5px);
}

.option-btn.correct {
    background: rgba(0, 210, 110, 0.2) !important;
    border-color: #00d26a !important;
    color: #00d26a !important;
    font-weight: 700 !important;
}

.option-btn.wrong {
    background: rgba(255, 71, 87, 0.2) !important;
    border-color: #ff4757 !important;
    color: #ff4757 !important;
}

/* ===========================
   FEEDBACK MESSAGE
=========================== */
.feedback-msg {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    min-height: 28px;
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease;
}

.feedback-correct { color: #00d26a; }
.feedback-wrong   { color: #ff4757; }

/* ===========================
   SCORE CIRCLE (RESULTS)
=========================== */
.result-top-card {
    text-align: center;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ffd32a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    box-shadow: 0 0 40px rgba(255,107,107,0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,100% { box-shadow: 0 0 30px rgba(255,107,107,0.4); }
    50%      { box-shadow: 0 0 55px rgba(255,107,107,0.8); }
}

.score-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#scoreDisplay {
    font-size: 2.6rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.score-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
}

/* ===========================
   STARS (RESULTS)
=========================== */
.stars-row {
    font-size: 2rem;
    margin: 10px 0;
    letter-spacing: 3px;
}

.result-message {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd32a;
    margin: 10px 0 8px;
}

.small-text {
    color: #a8b2d8;
    font-size: 0.82rem;
}

/* ===========================
   REVIEW ANSWERS (RESULTS)
=========================== */
.review-item {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid transparent;
    animation: fadeIn 0.4s ease;
}

.review-item.correct-review {
    border-left-color: #00d26a;
}

.review-item.wrong-review {
    border-left-color: #ff4757;
}

.review-q {
    font-size: 0.92rem;
    color: #ccd6f6;
    margin-bottom: 8px;
    font-weight: 600;
}

.review-your {
    font-size: 0.88rem;
    margin: 3px 0;
}

.review-correct-ans {
    font-size: 0.88rem;
    color: #00d26a;
    font-weight: 700;
    margin: 3px 0;
}

.review-status {
    font-size: 0.82rem;
    font-weight: 800;
    margin-top: 6px;
}

/* ===========================
   STAR RATING (REVIEW PAGE)
=========================== */
.star-rating {
    display: flex;
    gap: 8px;
    font-size: 2.2rem;
    margin-top: 5px;
    cursor: pointer;
}

.star {
    color: rgba(255,255,255,0.2);
    transition: color 0.2s, transform 0.2s;
    user-select: none;
}

.star:hover,
.star.active {
    color: #ffd32a;
    transform: scale(1.15);
}

.star-label {
    color: #a8b2d8;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

/* ===========================
   RADIO GROUP (REVIEW)
=========================== */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ccd6f6;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s, border-color 0.2s;
}

.radio-label:hover {
    background: rgba(255,107,107,0.1);
    border-color: rgba(255,107,107,0.3);
}

.radio-label input[type="radio"] {
    width: auto;
    accent-color: #ff6b6b;
}

/* ===========================
   ADMIN DASHBOARD
=========================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 900;
    color: #ff6b6b;
}

.stat-label {
    font-size: 0.75rem;
    color: #a8b2d8;
    font-weight: 600;
}

/* ===========================
   TABS (ADMIN)
=========================== */
.tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 11px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #a8b2d8;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 0;
    width: auto;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: transparent;
}

.tab-content {
    animation: fadeIn 0.4s ease;
}

.tab-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.tab-controls input {
    flex: 1;
    padding: 10px 14px;
}

/* ===========================
   RESULT ENTRIES (ADMIN)
=========================== */
.result-entry {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 13px;
    padding: 16px 18px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
    transition: transform 0.2s, border-color 0.2s;
}

.result-entry:hover {
    transform: translateX(4px);
    border-color: rgba(255,107,107,0.35);
}

.entry-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.entry-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ff6b6b;
}

.score-pill {
    background: linear-gradient(135deg, #ff6b6b, #ffd32a);
    color: white;
    font-weight: 800;
    padding: 3px 13px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.entry-detail {
    color: #a8b2d8;
    font-size: 0.85rem;
    margin: 2px 0;
}

/* ===========================
   REVIEW ENTRIES (ADMIN)
=========================== */
.review-entry {
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 13px;
    padding: 16px 18px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.review-entry-name {
    font-size: 1rem;
    font-weight: 800;
    color: #a855f7;
    margin-bottom: 8px;
}

.review-entry p {
    color: #a8b2d8;
    font-size: 0.88rem;
    margin: 5px 0;
    line-height: 1.5;
}

.review-entry strong {
    color: #ccd6f6;
}

.review-stars {
    color: #ffd32a;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* ===========================
   NO DATA MESSAGE
=========================== */
.no-data {
    text-align: center;
    color: #a8b2d8;
    font-style: italic;
    padding: 30px;
}

/* ===========================
   ERROR MESSAGE
=========================== */
.error {
    color: #ff4757;
    font-size: 0.88rem;
    margin-top: 10px;
    min-height: 20px;
    text-align: center;
}

/* ===========================
   ADMIN LINK (HIDDEN)
=========================== */
.admin-link {
    text-align: center;
    margin-top: 20px;
}

.admin-link a {
    color: rgba(255,255,255,0.15);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s;
}

.admin-link a:hover {
    color: rgba(255,255,255,0.5);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 500px) {
    h1          { font-size: 1.5rem; }
    h2          { font-size: 1.25rem; }
    .card       { padding: 22px 16px; }
    .stats-row  { grid-template-columns: repeat(2, 1fr); }
    .score-circle { width: 130px; height: 130px; }
    #scoreDisplay { font-size: 2rem; }
    .quiz-info-cards { flex-direction: column; }
}