/* Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #1E3A8A; /* Deep blue text */
    background-color: #FFFFFF; /* White background */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Responsive typography and spacing */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    p, li {
        font-size: 0.95rem;
    }
    
    footer {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .admin-container {
        width: 90%;
        padding: 1rem;
    }
    
    .tab-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Custom alignment tags */
left {
    display: block;
    text-align: left;
}

ctr {
    display: block;
    text-align: center;
}

header {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.site-logo {
    height: 50px;
    width: auto;
}

/* Responsive header styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .site-logo {
        height: 40px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

main {
    max-width: 1400px; /* Increased from 1200px to 1400px */
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

section {
    background-color: #F3F4F6; /* Light gray background */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.1); /* Blue-tinted shadow */
    margin-bottom: 2rem;
    border: 1px solid #DBEAFE; /* Light blue border */
    text-align: center;
}

/* Responsive section styles */
@media (max-width: 768px) {
    main {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    #info-content {
        padding: 0 1rem;
    }
    
    .welcome-content {
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .features, .login-box {
        min-width: 250px;
        padding: 1rem;
    }
}

h2 {
    color: #1E3A8A; /* Deep blue */
    margin-bottom: 1rem;
    text-align: center;
}

#info-content {
    text-align: center;
    margin: 0 auto;
    max-width: 1000px; /* Increased from 800px to 1000px */
    display: inline-block;
}

#info-content p {
    text-align: center;
    margin: 1rem auto;
}

#info-content ul {
    text-align: center;
    margin: 1rem auto;
    display: inline-block;
    padding-left: 0;
}

#info-content li {
    text-align: left;
    margin-bottom: 0.5rem;
    list-style-position: inside;
}

/* Responsive content styles */
@media (max-width: 768px) {
    #info-content {
        max-width: 90%;
        font-size: 0.9rem;
    }
    
    #info-content p, #info-content li {
        margin: 0.8rem auto;
        line-height: 1.5;
    }
    
    #info-content ul {
        padding-left: 1rem;
    }
}

#login-form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
}

#login-form input {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
}

#login-form button {
    padding: 0.75rem;
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#login-form button:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

/* Responsive form styles */
@media (max-width: 768px) {
    #login-form {
        width: 90%;
        padding: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    #login-form input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    #login-form button {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .note {
        font-size: 0.8rem;
    }
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    margin-top: auto;
}

/* Welcome Page Styles */
#welcome-section {
    text-align: center;
    background-color: none;
}

.welcome-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.features, .login-box {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.features ul {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.features li {
    margin-bottom: 0.5rem;
}

.login-box {
    background-color: #DBEAFE;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #1E3A8A;
}



.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #1E3A8A;
}

.note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Logout Button */
.logout-btn {
    background-color: #DC2626; /* Red */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.logout-btn:hover {
    background-color: #B91C1C; /* Darker red */
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.question {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 4px solid #1E3A8A; /* Blue accent */
    background-color: #F3F4F6; /* Light gray background */
}

.question-image {
    text-align: center;
    margin: 1rem 0;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(30, 58, 138, 0.1);
}

.options {
    margin-top: 0.5rem;
}

.option {
    display: block;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: #DBEAFE; /* Light blue background */
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #1E3A8A; /* Blue border */
}

.option:hover {
    background-color: #BFDBFE; /* Slightly darker blue */
}

.option input {
    margin-right: 0.5rem;
}

.submit-btn {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

.results {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #DBEAFE; /* Light blue background */
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
}

/* Responsive quiz styles */
@media (max-width: 768px) {
    .quiz-container {
        width: 90%;
        padding: 1rem;
    }
    
    .question {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .question-image {
        margin: 0.8rem 0;
    }
    
    .question-image img {
        max-width: 95%;
    }
    
    .option {
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    
    .submit-btn, .check-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* Matching Game Styles */
.matching-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 400px;
}

.matching-question {
    padding: 1rem;
    background-color: #F3F4F6; /* Light gray background */
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
    margin-bottom: 1rem;
}

.question-image {
    text-align: center;
    margin-bottom: 1rem;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Responsive matching game styles */
@media (max-width: 768px) {
    .matching-container {
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .matching-question {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .option {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

.option {
    padding: 1rem;
    background-color: #DBEAFE; /* Light blue background */
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.option:hover {
    background-color: #BFDBFE; /* Slightly darker blue */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.1); /* Blue-tinted shadow */
}

.option.selected {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
}

.option input[type="radio"] {
    margin-right: 0.5rem;
}

.check-btn {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin: 1rem auto;
    display: block;
}

.check-btn:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

/* Fortune Cookie Styles */
.fortune-container {
    text-align: center;
    max-width: 800px; /* Increased from 600px to 800px */
    margin: 0 auto;
}

.cookie-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.cookie-image:hover {
    transform: scale(1.05);
}

.fortune-result {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #DBEAFE; /* Light blue background */
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 8px;
    display: none;
}

.close-btn {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

.close-btn:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

/* Responsive fortune cookie styles */
@media (max-width: 768px) {
    .fortune-container {
        width: 90%;
        padding: 1rem;
    }
    
    .cookie-image {
        width: 150px;
        height: 150px;
        margin: 0 auto 1.5rem;
    }
    
    .fortune-result {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .close-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Admin Panel Styles */
.admin-container {
    max-width: 800px;
    margin: 0 auto;
}

.admin-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
    background-color: #F3F4F6; /* Light gray background */
}

.admin-section h3 {
    margin-bottom: 1rem;
    color: #1E3A8A; /* Deep blue */
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #1E3A8A; /* Blue border */
    border-radius: 4px;
    background-color: #FFFFFF; /* White background */
}

/* Responsive admin panel styles */
@media (max-width: 768px) {
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .distribution-bar,
    .prize-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .distribution-label,
    .prize-name {
        flex-basis: 100%;
        margin-bottom: 0.5rem;
    }
    
    .export-buttons {
        text-align: center;
    }
    
    .save-btn {
        width: 100%;
        margin: 0.5rem 0;
    }
}

.save-btn {
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.save-btn:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #1E3A8A;
}

.tab-button {
    background-color: #DBEAFE;
    color: #1E3A8A;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
    margin-right: 0.5rem;
}

.tab-button:hover {
    background-color: #BFDBFE;
}

.tab-button.active {
    background-color: #1E3A8A;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Analytics Styles */
.analytics-header {
    margin-bottom: 1rem;
}

.analytics-header h3 {
    color: #1E3A8A;
    border-bottom: 2px solid #1E3A8A;
    padding-bottom: 0.5rem;
}

.analytics-subheader {
    margin: 1.5rem 0 1rem 0;
}

.analytics-subheader h4 {
    color: #3730A3;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.analytics-card {
    background-color: #DBEAFE;
    border: 1px solid #1E3A8A;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}

.analytics-card h5 {
    margin-bottom: 0.5rem;
    color: #1E3A8A;
}

.analytics-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1E3A8A;
}

/* Analytics Distribution Styles */
.analytics-distribution {
    margin-top: 1rem;
}

.distribution-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.distribution-label {
    flex: 0 0 200px;
    font-weight: bold;
}

.distribution-progress {
    flex: 1;
    height: 20px;
    background-color: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #1E3A8A;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.distribution-value {
    flex: 0 0 80px;
    text-align: right;
    font-weight: bold;
}

/* Prize Distribution Styles */
.prize-distribution {
    margin-top: 1rem;
}

.prize-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.prize-name {
    flex: 0 0 250px;
    font-weight: bold;
}

.prize-bar {
    flex: 1;
    height: 20px;
    background-color: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.prize-fill {
    height: 100%;
    background: linear-gradient(90deg, #1E3A8A, #3730A3);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.prize-count {
    flex: 0 0 50px;
    text-align: right;
    font-weight: bold;
}

/* Results Styles */
.results-header {
    margin-bottom: 1rem;
}

.results-header h3 {
    color: #1E3A8A;
    border-bottom: 2px solid #1E3A8A;
    padding-bottom: 0.5rem;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.user-results-section {
    background-color: #FFFFFF;
    border: 1px solid #1E3A8A;
    border-radius: 4px;
    padding: 1rem;
}

.user-header {
    margin-bottom: 1rem;
}

.user-header h4 {
    color: #1E3A8A;
    margin-bottom: 0.5rem;
}

.user-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #4B5563;
}

.user-stats span {
    background-color: #DBEAFE;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Action buttons for results */
.delete-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #FEE2E2;
}

/* Export buttons */
.export-buttons {
    text-align: center;
    margin-bottom: 2rem;
}

.export-buttons .save-btn {
    margin: 0.5rem;
}

/* Results Table Styles */
.results-table {
    overflow-x: auto;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
}

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

.results-table th {
    background-color: #1E3A8A;
    color: white;
    font-weight: bold;
}

.results-table tr:nth-child(even) {
    background-color: #F3F4F6;
}

.results-table tr:hover {
    background-color: #DBEAFE;
}

/* Performance indicators */
.performance {
    font-weight: bold;
    text-align: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.performance.excellent {
    background-color: #16A34A;
    color: white;
}

.performance.good {
    background-color: #2563EB;
    color: white;
}

.performance.fair {
    background-color: #F59E0B;
    color: white;
}

.performance.poor {
    background-color: #DC2626;
    color: white;
}

/* Result Buttons */
.result-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background-color: #1E3A8A; /* Deep blue */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #3730A3; /* Slightly lighter blue */
}

/* Error Styles */
.error {
    color: #DC2626;
    font-weight: bold;
    padding: 1rem;
    background-color: #FEE2E2;
    border: 1px solid #DC2626;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Favicon */
link[rel="icon"] {
    display: block;
}
