/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-size: 2.2em;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(245, 87, 108, 0.8);
    }
}

.tagline {
    color: #666;
    font-size: 1.1em;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
    animation: slideIn 0.3s ease-in;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-right: 10px;
}

.btn-logout {
    background: #dc3545;
    color: white;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
}

.admin-link a {
    color: #667eea;
    text-decoration: none;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Dashboard Styles */
.dashboard-page {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

.header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: white;
    font-size: 2em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.dashboard-main {
    padding: 40px 0;
}

.dashboard-main h2 {
    color: white;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.quiz-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.quiz-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.quiz-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.quiz-card p {
    color: #666;
    margin-bottom: 15px;
}

.quiz-card .quiz-meta {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.quiz-card .btn {
    width: 100%;
}

/* Quiz Page Styles */
.quiz-page {
    background: #0a0a2e;
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.quiz-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
}

/* Prize Ladder */
.prize-ladder {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.prize-ladder h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #ffd700;
}

.prize-list {
    display: flex;
    flex-direction: column-reverse;
}

.prize-item {
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.prize-item.active {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.1);
    font-weight: bold;
}

.prize-item.completed {
    background: rgba(0, 255, 0, 0.2);
}

/* Quiz Main Area */
.quiz-main {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.question-info {
    font-size: 1.2em;
    color: #ffd700;
}

.timer-container {
    position: relative;
}

.timer {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.timer.warning {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    animation: flashWarning 0.5s infinite;
}

@keyframes flashWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.question-container {
    background: rgb(255, 255, 255);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-text {
    font-size: 4.8rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.6;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.option {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px;
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    gap: 15px;
}

.option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.option.selected {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-color: #ffffff;
    transform: scale(1.05);
}

.option.correct {
    background: linear-gradient(45deg, #11998e 0%, #38ef7d 100%);
    animation: correctAnswer 0.5s ease-in;
}

.option.wrong {
    background: linear-gradient(45deg, #eb3349 0%, #f45c43 100%);
    animation: wrongAnswer 0.5s ease-in;
}

.option.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.option:disabled {
    cursor: not-allowed;
}

@keyframes correctAnswer {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes wrongAnswer {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.option-label {
    font-weight: bold;
    color: #ffd700;
    min-width: 25px;
    font-size: 1.3em;
}

.option-text {
    font-weight: bold;
    font-size: 1.1em;
}

.lock-container {
    text-align: center;
}

.btn-lock {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 50px;
    font-size: 1.2em;
}

.btn-lock:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Lifelines */
.lifelines-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.lifelines-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #ffd700;
}

.lifelines {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.lifeline {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 15px;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2em;
}

.lifeline:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.lifeline:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #666;
    color: #666;
}

.action-buttons {
    margin-top: 20px;
}

.btn-quit {
    background: #dc3545;
    color: white;
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: slideDown 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 20px;
    color: black;
    font-size: 2em;
}

#result-message {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: black;
}

#result-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: black;
}

.audience-poll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.poll-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.poll-percentage {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.poll-option {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    padding: 5px;
    margin-top: 5px;
}

/* Admin Styles */
.admin-page {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
}

.admin-section {
    display: none;
    padding: 20px;
}

.admin-section.active {
    display: block;
}

.admin-quiz-list {
    display: grid;
    gap: 20px;
}

.admin-quiz-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.admin-quiz-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.quiz-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.quiz-header p {
    margin: 0;
    color: #666;
}

.quiz-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.quiz-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #4caf50;
    color: white;
}

.badge-inactive {
    background: #999;
    color: white;
}

.badge-easy {
    background: #4caf50;
    color: white;
}

.badge-medium {
    background: #ff9800;
    color: white;
}

.badge-hard {
    background: #f44336;
    color: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.quiz-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.quiz-details p {
    margin: 10px 0;
}

.questions-list {
    display: grid;
    gap: 20px;
}

.question-view {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.question-view h4 {
    margin: 0 0 15px 0;
    color: #667eea;
}

.question-text {
    font-size: 50px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.options-view {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.options-view .option {
    padding: 12px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
}

.options-view .option.correct {
    background: #e8f5e9;
    border-color: #4caf50;
    font-weight: 600;
    color: #2e7d32;
}

.question-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.create-quiz-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
}

.question-field {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.question-field h4 {
    margin-bottom: 15px;
    color: #333;
}

.bulk-import-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 30px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.bulk-import-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.bulk-import-section textarea {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

.bulk-import-section textarea:focus {
    border-color: #667eea;
    outline: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.report-data {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.report-table th,
.report-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.report-table th {
    background: #667eea;
    color: white;
}

.report-table tr:hover {
    background: #f5f5f5;
}

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffd700;
    color: #333;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
}

.rank-badge.first {
    background: #ffd700;
}

.rank-badge.second {
    background: #c0c0c0;
}

.rank-badge.third {
    background: #cd7f32;
}

/* User Management Section */
.create-user-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.create-user-form h3 {
    margin-top: 0;
    color: #667eea;
}

.users-list {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.users-list h3 {
    margin-top: 0;
    color: #667eea;
}

#users-table {
    overflow-x: auto;
}

/* Logo Styles and Animations */
.main-logo {
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255,215,0,0.8));
    }
}

.admin-logo {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    /* Quiz Page Layout */
    .quiz-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .prize-ladder,
    .lifelines-container {
        max-height: none;
        order: 2;
    }
    
    .quiz-main {
        order: 1;
    }
    
    /* Prize Ladder Horizontal */
    .prize-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .prize-item {
        flex: 1;
        min-width: 80px;
    }
    
    /* Lifelines Horizontal */
    .lifelines {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .lifeline {
        flex: 1;
        min-width: 150px;
        padding: 12px;
        font-size: 1em;
    }
    
    /* Admin Quiz List */
    .quiz-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    /* Header */
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Dashboard */
    .dashboard-main h2 {
        font-size: 1.5em;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Quiz Page */
    .quiz-page {
        padding: 10px;
    }
    
    .quiz-main {
        padding: 15px;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .question-info {
        text-align: center;
        font-size: 1em;
    }
    
    .timer-container {
        display: flex;
        justify-content: center;
    }
    
    .timer {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .question-container {
        padding: 20px;
        min-height: 120px;
    }
    
    .question-text {
        font-size: 1.2em;
        color: #333;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .option {
        padding: 15px;
        font-size: 1em;
    }
    
    .option-label {
        min-width: 20px;
    }
    
    /* Prize Ladder */
    .prize-ladder {
        padding: 15px;
    }
    
    .prize-item {
        padding: 8px;
        font-size: 0.9em;
        min-width: 70px;
    }
    
    /* Lifelines */
    .lifelines-container {
        padding: 15px;
    }
    
    .lifeline {
        padding: 10px;
        font-size: 0.9em;
        min-width: 120px;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px;
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .modal-content h2 {
        font-size: 1.5em;
    }
    
    #result-message {
        font-size: 1.2em;
    }
    
    /* Audience Poll */
    .audience-poll {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    /* Admin Page */
    .admin-quiz-item {
        padding: 15px;
    }
    
    .quiz-actions {
        flex-wrap: wrap;
    }
    
    .btn-sm {
        flex: 1;
        min-width: 100px;
    }
    
    /* Admin Modal */
    .modal-large {
        max-width: 95%;
    }
    
    .questions-list {
        gap: 15px;
    }
    
    .question-view {
        padding: 15px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    /* Report Table */
    .report-table {
        font-size: 0.9em;
    }
    
    .report-table th,
    .report-table td {
        padding: 8px;
    }
    
    /* Form Fields */
    .question-field {
        padding: 15px;
    }
    
    .bulk-import-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    /* Login Page */
    .login-container {
        padding: 25px;
        width: 95%;
    }
    
    .main-title {
        font-size: 1.8em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    /* Header */
    .header {
        padding: 15px 0;
    }
    
    .header h1 {
        font-size: 1.3em;
    }
    
    /* Dashboard */
    .dashboard-main {
        padding: 20px 0;
    }
    
    .dashboard-main h2 {
        font-size: 1.3em;
    }
    
    .quiz-card {
        padding: 20px;
    }
    
    .quiz-card h3 {
        font-size: 1.3em;
    }
    
    /* Quiz Page */
    .quiz-main {
        padding: 10px;
    }
    
    .question-info {
        font-size: 0.9em;
    }
    
    .timer {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .question-container {
        padding: 15px;
        min-height: 100px;
    }
    
    .question-text {
        font-size: 1em;
    }
    
    .options-container {
        gap: 10px;
    }
    
    .option {
        padding: 12px;
        font-size: 0.9em;
    }
    
    .btn-lock {
        padding: 12px 30px;
        font-size: 1em;
    }
    
    /* Prize Ladder Mobile */
    .prize-ladder {
        padding: 10px;
    }
    
    .prize-ladder h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .prize-item {
        padding: 6px;
        font-size: 0.8em;
        min-width: 60px;
    }
    
    /* Lifelines Mobile */
    .lifelines-container {
        padding: 10px;
    }
    
    .lifelines-container h3 {
        font-size: 1em;
    }
    
    .lifelines {
        flex-direction: column;
        gap: 10px;
    }
    
    .lifeline {
        width: 100%;
        min-width: auto;
        padding: 10px;
        font-size: 0.85em;
    }
    
    .action-buttons {
        margin-top: 15px;
    }
    
    .btn-quit {
        padding: 10px;
        font-size: 0.9em;
    }
    
    /* Modal Mobile */
    .modal-content {
        padding: 15px;
        width: 98%;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
    
    .close-btn {
        font-size: 24px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    #result-message {
        font-size: 1em;
    }
    
    #result-stats {
        padding: 15px;
        font-size: 0.9em;
    }
    
    /* Audience Poll Mobile */
    .audience-poll {
        grid-template-columns: 1fr;
    }
    
    .poll-percentage {
        font-size: 1.5em;
    }
    
    /* Admin Page Mobile */
    .admin-page {
        padding: 10px;
    }
    
    .admin-section {
        padding: 10px;
    }
    
    .admin-quiz-item {
        padding: 12px;
    }
    
    .quiz-header h3 {
        font-size: 1.1em;
    }
    
    .quiz-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-sm {
        width: 100%;
        min-width: auto;
        padding: 10px;
    }
    
    /* Question View Mobile */
    .question-view {
        padding: 12px;
    }
    
    .question-view h4 {
        font-size: 1em;
    }
    
    .question-text {
        font-size: 0.95em;
    }
    
    .options-view .option {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .question-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    /* Form Elements Mobile */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.95em;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    /* Report Table Mobile */
    .report-table {
        font-size: 0.75em;
        display: block;
        overflow-x: auto;
    }
    
    .report-table thead {
        display: none;
    }
    
    .report-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }
    
    .report-table td {
        display: block;
        text-align: right;
        padding: 8px;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    .report-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }
    
    /* Users Table Mobile */
    #users-table {
        overflow-x: auto;
    }
    
    /* Question Fields Mobile */
    .question-field {
        padding: 12px;
    }
    
    .question-field h4 {
        font-size: 1em;
    }
    
    /* Bulk Import Mobile */
    .bulk-import-section textarea {
        font-size: 11px;
        padding: 10px;
    }
    
    /* Create User Form Mobile */
    .create-user-form {
        padding: 15px;
    }
    
    .users-list {
        padding: 15px;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .login-container {
        padding: 20px;
    }
    
    .main-title {
        font-size: 1.5em;
    }
    
    .quiz-card {
        padding: 15px;
    }
    
    .question-text {
        font-size: 0.9em;
    }
    
    .option {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .timer {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }
    
    .prize-item {
        font-size: 0.7em;
        min-width: 50px;
    }
    
    .lifeline {
        font-size: 0.75em;
        padding: 8px;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .quiz-main {
        padding: 10px;
    }
    
    .question-container {
        min-height: 80px;
        padding: 15px;
    }
    
    .question-text {
        font-size: 1em;
    }
    
    .options-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .option {
        padding: 10px;
    }
    
    .timer {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .btn,
    .lifelines-container,
    .action-buttons,
    .header .btn-logout {
        display: none;
    }
    
    .quiz-container {
        display: block;
    }
    
    .question-view {
        page-break-inside: avoid;
    }
}
