/* style.css */
/* Load required fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    min-height: 100vh;
}

/* Container Styles */
.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.container-sm {
    max-width: 400px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1 {
    color: #1a73e8;
    margin-bottom: 30px;
    text-align: center;
}

h2 {
    color: #1a73e8;
    margin-bottom: 20px;
}

h3 {
    margin-bottom: 1rem;
    color: #1a73e8;
}

h5 {
    font-size: 1.2rem; /* Adjust size as needed */
    color: #ef6941de;     /* Choose your color */
    margin-bottom: 10px; /* Adjust spacing */
    text-align: center;   /* Change alignment if needed */
}

h6 {
    font-size: 1.2rem; /* Adjust size as needed */
    color: #6800adde;     /* Choose your color */
    margin-bottom: 5px; /* Adjust spacing */
    text-align: left;   /* Change alignment if needed */
}

h7 {
    font-size: 1.3rem; /* Adjust size as needed */
    color: #df3906de;     /* Choose your color */
    margin-bottom: 3px; /* Adjust spacing */
    text-align: left;   /* Change alignment if needed */
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

/* Button Styles */
.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
}

.btn-primary:hover {
    background-color: #1557b0;
}

.btn-secondary {
    background-color: #00054d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5f62de;
}

.btn-tertiary {
    background-color: #7742cd;
    color: white;
}

.btn-teriary:hover {
    background-color: #6769be;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #12ac01;
    color: white;
}

.btn-success:hover {
    background-color: #00610d;
}

/* Navigation */
.navbar {
    background-color: #1a73e8;
    padding: 0.3rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}



/* Add responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem;  /* Even smaller padding on mobile */
    }

    .navbar-content {
        padding: 0 20px;  /* Reduce horizontal padding */
    }

    .navbar h1 {
        font-size: 1.4rem;  /* Smaller title on mobile */
        margin: 0;  /* Remove any margin */
    }

    .navbar .btn {
        padding: 0.5rem 0.9rem;  /* Smaller button padding */
        font-size: 1.2rem;  /* Smaller button text */
    }

    .navbar-logo {
        width: 35px;  /* Slightly smaller logo on mobile */
        height: 35px;
    }
}

/* Nav bar logo */
.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 5px;
    }

    .navbar-left {
        flex-direction: column;
    }

    .navbar-logo {
        margin-bottom: 5px;
    }
}




/* User Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    background-color: #1557b0;  /* Dark blue background */
    border: none;  /* Removed yellow border */
    color: white;
    cursor: pointer;
    padding: 8px 16px;  /* Increased padding */
    display: flex;
    align-items: center;
    gap: 8px;  /* Increased from 4px */
    font-size: 1.3rem;  /* Increased font size */
    border-radius: 6px;  /* Added rounded corners */
    transition: background-color 0.2s;
}

.user-menu-btn:hover {
    background-color: #0d3d8d;  /* Darker blue on hover */
}

.user-menu-btn i {
    font-size: 1.2rem;  /* Increased icon size */
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);  /* Added small gap between button and menu */
    background-color: white;
    min-width: 250px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 1rem;  /* Increased font size */
}

.dropdown-menu a i {
    margin-right: 8px;  /* Added spacing between icon and text */
    width: 20px;  /* Fixed width for icons to align text */
    text-align: center;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.4rem;  /* Even smaller padding on mobile */
    }
    
    .user-menu-btn {
        padding: 6px 12px;  /* Slightly smaller padding on mobile */
    }

    /* Adjust font size for mobile view */
    .dropdown-menu a {
        font-size: 1.5rem;  /* Larger font size for mobile */
        padding: 10px 12px;  /* Adjust padding for smaller screens */
    }

    /* Make sure the menu width doesn't exceed screen width */
    .dropdown-menu {
        min-width: 100%;  /* Full width on small screens */
        left: 0;  /* Align the menu to the left edge */
        right: auto;  /* Remove right positioning */
    }

    /* Optionally, adjust icon size for mobile */
    .dropdown-menu a i {
        width: 24px;  /* Adjust icon size */
    }


}

/* Links */
.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #1a73e8;
    text-decoration: none;
    margin: 0 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
}

/* Dashboard Specific */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}


.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: rgb(238, 238, 239);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(235, 235, 235, 0.1);
}

.game-info {
    margin-bottom: 1.5rem;
    background-color: rgb(232, 235, 247);
}

.game-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.game-actions {
    display: flex;
    gap: 0.5rem;
}

.game-code {
    font-weight: bold;
    margin-right: 8px;
}

/*Copy Button */

.btn.btn-secondary i.fa-copy {
    margin: 0;
    font-size: 1rem;
}

.game-info .btn.btn-secondary {
    padding: 6px 10px;  /* Reduced padding */
    font-size: 0.9rem;  /* Smaller font size */
    margin-left: 5px;  /* Space between code and button */
    line-height: 1;    /* Reduces height */
}

/* Optional: if you want to adjust vertical alignment */
.game-info .code-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* Messages */
.error {
    color: #dc3545;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #fae3e5;
}

.success {
    color: #28a745;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    background-color: #d4edda;
}

/* Responsive Design */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    .container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .navbar-content {
        flex-direction: column;
        gap: 10px;
    }

    .user-menu {
        width: 100%;
        text-align: center;
    }

    .user-menu-btn {
        width: 100%;
        justify-content: center;
    }

    .dropdown-menu {
        width: 100%;
    }
}


/* Additional styles for create_game.php */
.question-card {
    margin-bottom: 2rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-top: 5px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    background-color: white;
}

.options-container {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.question-card .btn-danger {
    padding: 8px 16px;
}

.form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.timer-info {
    display: block;
    color: #666;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

#timer_seconds {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}


/* Additional styles for game management */
.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.game-code {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #1a73e8;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.game-info {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.option-group {
    position: relative;
    margin-bottom: 1rem;
}

.correct-marker {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
}

.validation-error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .nav-actions {
        flex-direction: column;
        width: 100%;
    }

    .nav-actions .btn {
        width: 100%;
    }

    .code-display {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .question-actions {
        flex-direction: column;
    }

    .question-actions .btn {
        width: 100%;
    }
}

/* Logo*/
   .logo-container {
        margin-top: 40px;
        text-align: center;
    }

    .logo {
        max-width: 200px;  /* Adjust this value based on your logo size */
        height: auto;
    }

    @media (max-width: 480px) {
        .logo {
            max-width: 150px;  /* Slightly smaller on mobile */
        }
    }



/* Game Play*/
            .game-container {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 2rem;
            margin-top: 2rem;
        }

        .question-display {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .sidebar {
            background: white;
            padding: 1.5rem;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .timer {
            font-size: 2rem;
            text-align: center;
            margin: 1rem 0;
            color: #1a73e8;
        }

        .user-list {
            margin-top: 1rem;
        }

        .user-item {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem;
            border-bottom: 1px solid #eee;
        }

        .answer-option {
            display: block;
            padding: 1rem;
            margin: 0.5rem 0;
            border: 2px solid #eee;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .answer-option.correct {
            background-color: #d4edda;
            border-color: #28a745;
        }

        .answer-option.incorrect {
            background-color: #f8d7da;
            border-color: #dc3545;
        }

        .results-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1rem;
        }

        .results-table th,
        .results-table td {
            padding: 0.75rem;
            border: 1px solid #dee2e6;
            text-align: left;
        }

        .results-table th {
            background-color: #f8f9fa;
        }

        @media (max-width: 768px) {
            .game-container {
                grid-template-columns: 1fr;
            }
        }



/* Add this to your style.css or in the head section of both pages */

/* Common styles for both pages */
.credit-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.credit-header {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.credit-balance {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
    font-family: 'Poppins', sans-serif;
}

.credit-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-family: 'Inter', sans-serif;
}

/* Credit Package Styles */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.package-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #eef2f7;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #2193b0;
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2193b0, #6dd5ed);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.package-card:hover::before {
    opacity: 1;
}

.package-credits {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2193b0;
    margin: 1rem 0;
    font-family: 'Poppins', sans-serif;
}

.package-price {
    font-size: 1.8rem;
    color: #333;
    margin: 1rem 0;
    font-family: 'Inter', sans-serif;
}

/* Transaction History Styles */
.transaction-list {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.transaction-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.transaction-item:hover {
    background-color: #f8fafc;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.transaction-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    font-family: 'Inter', sans-serif;
}

.transaction-date {
    font-size: 0.9rem;
    color: #6b7280;
    font-family: 'Inter', sans-serif;
}

.transaction-amount {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.transaction-amount.positive {
    color: #10b981;
}

.transaction-amount.negative {
    color: #ef4444;
}

.game-code {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #2193b0;
    color: white;
    border-color: #2193b0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .credit-container {
        padding: 1rem;
    }
    
    .credit-header {
        padding: 1.5rem;
    }
    
    .credit-balance {
        font-size: 2rem;
    }
    
    .package-card {
        padding: 1.5rem;
    }
    
    .transaction-item {
        padding: 1rem;
    }
}

/* Button Styles */
.btn-purchase {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 147, 176, 0.3);
}

/* Pulsing animation */
.pulsing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}            