/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --luxury-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --warm-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --elegant-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--warm-gradient);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Special styling for Tư Vấn Miễn Phí button */
.btn-outline.btn-consultation {
    color: #0066ff;
    border-color: #0066ff;
    background: #0066ff;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.btn-outline.btn-consultation:hover {
    background: #0052cc;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    transform: translateY(-2px);
}

/* Address text styling */
.address-text {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.btn-success {
    background: var(--accent-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Header & Navigation */

/* Game Header Section */
.game-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
    filter: brightness(1.3);
}

.subtitle {
    font-size: 24px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    color: #fff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 16px rgba(255, 255, 255, 0.4);
    filter: brightness(1.2);
}

.header-info {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 16px;
}

/* Game Navigation */
.game-nav {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 16px;
}
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: 0.3s;
}

/* Animation for stats */
.stat-number {
    transition: all 0.5s ease;
}

.stat-number.animate {
    animation: countUp 1s ease-out;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: var(--luxury-gradient);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.4;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.highlight {
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-top: 5px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.hero-image video {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.video-controls .btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.video-controls .btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.video-controls .btn.sound-on {
    background: rgba(16, 185, 129, 0.8);
}

.video-controls .btn.sound-on:hover {
    background: rgba(16, 185, 129, 1);
}

/* Courses Section */
.courses {
    padding: 80px 0;
    background: var(--elegant-gradient);
    position: relative;
}

.courses::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.course-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-card.featured {
    border: 2px solid var(--secondary-color);
}

.course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.course-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.course-icon i {
    font-size: 28px;
    color: white;
}

.course-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.course-features {
    list-style: none;
    margin-bottom: 24px;
}

.course-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.course-features i {
    color: var(--accent-color);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--warm-gradient);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.about-text p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.about-features {
    list-style: none;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
}

.about-features i {
    color: var(--secondary-color);
    font-size: 18px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--elegant-gradient);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-item i {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.contact-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Practice Test Section */
.practice-section {
    padding: 80px 0;
    background: var(--warm-gradient);
    position: relative;
}

/* Game Section Base Styles */
.game-section {
    padding: 80px 0;
    background: var(--warm-gradient);
    position: relative;
}

.game-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.game-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.game-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.game-icon {
    font-size: 56px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.game-text h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.game-text p {
    font-size: 20px;
    color: var(--text-light);
    line-height: 1.6;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px auto;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    padding: 0 40px;
}

#gameCanvas {
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    background: white;
    max-width: 1000px;
    width: 100%;
    height: auto;
    min-height: 500px;
}

.game-instructions {
    background: white;
    border-radius: 20px;
    padding: 60px 50px;
    box-shadow: var(--shadow);
    margin-top: 60px;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.instructions-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    text-align: center;
    justify-content: center;
}

.instructions-header i {
    font-size: 28px;
    color: var(--primary-color);
}

.instructions-header h3 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.instruction-item {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 35px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.instruction-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.instruction-icon {
    font-size: 44px;
    margin-bottom: 25px;
    display: block;
}

.instruction-content h4 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.instruction-content p {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.practice-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.practice-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.practice-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.practice-card.featured {
    border: 2px solid var(--secondary-color);
}

.practice-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.practice-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.practice-icon i {
    font-size: 28px;
    color: white;
}

.practice-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.practice-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.practice-features {
    list-style: none;
    margin-bottom: 24px;
}

.practice-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.practice-features i {
    color: var(--accent-color);
}

.practice-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

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

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-content p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.6;
}

.discount-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
}

.discount-text {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.discount-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.modal-button {
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    border: none;
    min-width: 140px;
}

.modal-button.primary {
    background: #4CAF50;
    color: white;
}

.modal-button.primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.modal-button.secondary {
    background: #2196F3;
    color: white;
}

.modal-button.secondary:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

/* Floating Elements */
.floating-visitor-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transition: all 0.3s ease;
    min-width: 140px;
}

.floating-visitor-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.visitor-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.visitor-info {
    display: flex;
    flex-direction: column;
}

.visitor-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.visitor-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.floating-contact-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.contact-item-float {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-width: 160px;
    cursor: pointer;
}

.contact-item-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-item-float .contact-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.contact-item-float .contact-icon.zalo {
    background: #0068ff;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

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

.footer-section h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 15px;
    }
    
    /* Floating Elements Responsive */
    .floating-visitor-counter {
        bottom: 15px;
        left: 15px;
        padding: 10px 15px;
        min-width: 130px;
        z-index: 1000;
    }

    .visitor-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .visitor-number {
        font-size: 18px;
        font-weight: 600;
    }

    .visitor-label {
        font-size: 11px;
    }

    .floating-contact-info {
        bottom: 15px;
        right: 15px;
        gap: 8px;
        z-index: 1000;
    }

    .contact-item-float {
        padding: 10px 15px;
        min-width: 150px;
    }

    .contact-item-float .contact-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .contact-label {
        font-size: 11px;
    }

    .contact-value {
        font-size: 13px;
        font-weight: 600;
    }

    /* Header & Navigation Improvements */
    .header {
        padding: 4px 0;
    }
    
    .navbar {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 4px 0;
    }
    
    .logo {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .logo-img {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
            .logo-text {
            font-size: 18px;
            text-align: center;
            line-height: 1.2;
            flex: 1;
            margin: 0 auto;
        }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 30px 0;
        border-radius: 0 0 15px 15px;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }
    
    .nav-link {
        font-size: 16px;
        padding: 12px 20px;
        border-radius: 8px;
        margin: 0 20px;
    }
    
    .nav-buttons {
        display: none;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Game Header Responsive */
    .game-header-section {
        padding: 15px 0;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .logo-section {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }

    .main-title {
        font-size: 26px;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 15px;
        line-height: 1.3;
    }

    /* Increase logo size on mobile */
    .header-logo {
        width: 120px;
        height: 120px;
    }

    /* Hide contact info on mobile */
    .desktop-only {
        display: none;
    }

    /* Increase logo size on mobile */
    .header-logo {
        width: 120px;
        height: 120px;
    }

    .header-info {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
    }
    
    .contact-info {
        font-size: 15px;
        justify-content: center;
    }

    /* Hide contact info on mobile */
    .desktop-only {
        display: none;
    }

    /* Increase logo size on mobile */
    .header-logo {
        width: 100px;
        height: 100px;
    }

    /* Game Navigation Responsive */
    .game-nav {
        padding: 12px 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 12px;
        padding: 0 20px;
    }

    .nav-link {
        justify-content: center;
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
    }

    /* Game Section Responsive */
    .game-section {
        padding: 40px 0;
    }
    
    .game-header {
        margin-bottom: 30px;
    }
    
    .game-title-section {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .game-icon {
        font-size: 48px;
    }

    .game-text h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .game-text p {
        font-size: 16px;
        line-height: 1.5;
    }

    .game-container {
        margin: 30px auto;
        padding: 0 20px;
        max-width: 100%;
    }

    #gameCanvas {
        max-width: 100%;
        min-height: 300px;
        border-radius: 12px;
    }

    .game-instructions {
        margin-top: 30px;
        padding: 30px 25px;
        border-radius: 16px;
        max-width: 100%;
    }

    .instructions-header {
        margin-bottom: 25px;
        gap: 15px;
    }

    .instructions-header h3 {
        font-size: 24px;
    }

    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 0;
    }

    .instruction-item {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .instruction-icon {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .instruction-content h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .instruction-content p {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Hero Section Improvements */
    .hero {
        padding: 180px 0 60px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-image {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        justify-self: center;
    }

    .hero-title {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 20px;
        margin-top: 40px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 30px;
    }

    .hero-stats {
        justify-content: center;
        gap: 30px;
        margin: 30px 0;
    }
    
    .stat {
        text-align: center;
    }
    
    .stat-number {
        font-size: 28px;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 14px;
        margin-top: 5px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
    }
    
    .btn-large {
        padding: 18px 30px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Section Headers */
    .section-header {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 32px;
        margin-bottom: 15px;
        line-height: 1.2;
    }
    
    .section-header p {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Courses Section */
    .courses {
        padding: 60px 0;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .course-card {
        padding: 30px 25px;
        text-align: center;
    }
    
    .course-card h3 {
        font-size: 24px;
        margin: 20px 0 15px;
    }
    
    .course-card p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .course-features {
        margin: 20px 0;
        text-align: left;
    }
    
    .course-features li {
        font-size: 14px;
        margin-bottom: 10px;
        padding-left: 20px;
    }

    /* Practice Section */
    .practice-section {
        padding: 60px 0;
    }
    
    .practice-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .practice-card {
        padding: 30px 25px;
        text-align: center;
    }
    
    .practice-card h3 {
        font-size: 24px;
        margin: 20px 0 15px;
    }
    
    .practice-card p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .practice-features {
        margin: 20px 0;
        text-align: left;
    }
    
    .practice-features li {
        font-size: 14px;
        margin-bottom: 10px;
        padding-left: 20px;
    }

    .practice-stats {
        flex-direction: column;
        gap: 30px;
        margin-top: 40px;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-item .stat-number {
        font-size: 32px;
        font-weight: 700;
    }
    
    .stat-item .stat-label {
        font-size: 16px;
        margin-top: 8px;
    }

    /* About Section */
    .about {
        padding: 60px 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .about-text h2 {
        font-size: 32px;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .about-text p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    
    .about-features {
        text-align: left;
        margin: 0 auto;
        max-width: 400px;
    }
    
    .about-features li {
        font-size: 16px;
        margin-bottom: 12px;
        padding-left: 24px;
    }

    /* Contact Section */
    .contact {
        padding: 60px 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-item {
        margin-bottom: 24px;
        padding: 20px;
    }
    
    .contact-item i {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .contact-item h4 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .contact-item p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .contact-form {
        padding: 30px 25px;
    }
    
    .contact-form h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 16px;
    }

    /* Footer */
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-section h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .footer-section p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
        font-size: 14px;
    }

    /* Test Interface */
    .test-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    
    .test-info h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .test-info p {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .test-timer {
        font-size: 18px;
        padding: 12px 20px;
    }

    .test-controls {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .btn {
        padding: 15px 25px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 8px;
        padding: 20px;
    }

    .nav-button {
        width: 40px;
        height: 40px;
        font-size: 14px;
        border-radius: 8px;
    }

    .results-stats {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .results-stats .stat-item {
        text-align: center;
        padding: 20px;
    }
    
    .results-stats .stat-number {
        font-size: 28px;
        font-weight: 700;
    }
    
    .results-stats .stat-label {
        font-size: 16px;
        margin-top: 8px;
    }

    .results-actions {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .results-actions .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    /* Container for very small screens */
    .container {
        padding: 0 10px;
    }
    
    /* Floating Elements for Small Screens */
    .floating-visitor-counter {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
        min-width: 110px;
    }

    .visitor-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .visitor-number {
        font-size: 16px;
    }

    .visitor-label {
        font-size: 10px;
    }

    .floating-contact-info {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }

    .contact-item-float {
        padding: 8px 12px;
        min-width: 130px;
    }

    .contact-item-float .contact-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .contact-label {
        font-size: 10px;
    }

    .contact-value {
        font-size: 12px;
    }

    /* Header adjustments for very small screens */
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .main-title {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 14px;
    }

    /* Increase logo size on very small screens */
    .header-logo {
        width: 100px;
        height: 100px;
    }

    /* Hero Section for very small screens */
    .hero {
        padding: 160px 0 40px;
    }
    
    .hero-title {
        font-size: 26px;
        margin-top: 45px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 13px;
    }

    /* Section Headers for very small screens */
    .section-header h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .section-header p {
        font-size: 15px;
        line-height: 1.4;
    }

    /* Course Cards for very small screens */
    .course-card,
    .practice-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .course-card h3,
    .practice-card h3 {
        font-size: 22px;
        margin: 15px 0 10px;
    }
    
    .course-card p,
    .practice-card p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .course-features li,
    .practice-features li {
        font-size: 13px;
        margin-bottom: 8px;
        padding-left: 18px;
    }

    /* About Section for very small screens */
    .about-text h2 {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .about-text p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .about-features li {
        font-size: 15px;
        margin-bottom: 10px;
        padding-left: 20px;
    }

    /* Contact Section for very small screens */
    .contact-item {
        margin-bottom: 20px;
        padding: 16px;
    }
    
    .contact-item h4 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .contact-item p {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .contact-form {
        padding: 25px 20px;
    }
    
    .contact-form h3 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 16px;
    }

    /* Test Interface for very small screens */
    .test-content {
        padding: 15px;
    }
    
    .question-text {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .answer-option {
        padding: 12px 16px;
        margin-bottom: 10px;
    }
    
    .option-text {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .nav-grid {
        gap: 6px;
        padding: 15px;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
}

/* Tablet-specific improvements for index.html */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Game Container - Increase size and center */
    .game-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 50px auto;
        min-height: 500px;
        max-width: 1200px;
        padding: 0 30px;
    }
    
    #gameCanvas {
        max-width: 900px;
        width: 100%;
        height: auto;
        border-radius: 20px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        min-height: 450px;
    }
    
    /* Game Instructions - More uniform layout */
    .game-instructions {
        margin-top: 50px;
        padding: 50px 40px;
        border-radius: 20px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .instructions-header {
        margin-bottom: 40px;
    }
    
    .instructions-header h3 {
        font-size: 32px;
    }
    
    .instructions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin-top: 0;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .instruction-item {
        padding: 30px 25px;
        border-radius: 16px;
        margin-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .instruction-icon {
        font-size: 40px;
        margin-bottom: 20px;
    }
    
    .instruction-content h4 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .instruction-content p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Game Section improvements for tablets */
    .game-section {
        padding: 80px 0;
    }
    
    .game-header {
        margin-bottom: 50px;
    }
    
    .game-title-section {
        gap: 25px;
    }
    
    .game-icon {
        font-size: 56px;
    }
    
    .game-text h2 {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .game-text p {
        font-size: 20px;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    /* Improve touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for mobile */
    .hero {
        padding: 40px 0 60px;
    }
    
    .courses,
    .about,
    .practice-section,
    .contact {
        padding: 40px 0 60px;
    }
    
    /* Improve card layouts */
    .course-card,
    .practice-card {
        margin-bottom: 20px;
    }
    
    /* Better form inputs for mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improve floating elements positioning */
    .floating-visitor-counter,
    .floating-contact-info {
        position: fixed;
        z-index: 1000;
    }
    
    /* Better modal for mobile */
    .modal-content {
        margin: 20px;
        padding: 30px 25px;
        max-width: calc(100% - 40px);
    }
    
    /* Improve test interface for mobile */
    .test-content {
        padding: 20px;
    }
    
    .answer-option {
        min-height: 60px;
        padding: 15px 20px;
    }
    
    .option-label {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* Better navigation grid for mobile */
    .nav-grid {
        gap: 10px;
        padding: 20px;
    }
    
    .nav-button {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    /* Even better touch targets for small screens */
    .btn {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .nav-link {
        min-height: 48px;
        font-size: 16px;
    }
    
    /* Reduce padding for very small screens */
    .hero {
        padding: 30px 0 50px;
    }
    
    .courses,
    .about,
    .practice-section,
    .contact {
        padding: 30px 0 50px;
    }
    
    /* Better card spacing */
    .course-card,
    .practice-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    /* Improve form for very small screens */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Better floating elements for very small screens */
    .floating-visitor-counter {
        bottom: 8px;
        left: 8px;
        padding: 8px 10px;
    }
    
    .floating-contact-info {
        bottom: 8px;
        right: 8px;
        gap: 5px;
    }
    
    .contact-item-float {
        padding: 8px 10px;
        min-width: 120px;
    }
    
    /* Improve test interface for very small screens */
    .test-content {
        padding: 15px;
    }
    
    .answer-option {
        min-height: 56px;
        padding: 12px 16px;
    }
    
    .option-label {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Better navigation grid for very small screens */
    .nav-grid {
        gap: 8px;
        padding: 15px;
    }
    
    .nav-button {
        min-width: 40px;
        min-height: 40px;
        font-size: 12px;
    }
    
    /* Improve modal for very small screens */
    .modal-content {
        margin: 15px;
        padding: 25px 20px;
        max-width: calc(100% - 30px);
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-content p {
        font-size: 16px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .modal-button {
        min-height: 48px;
        font-size: 16px;
    }
} 

/* Tablet-specific improvements for index.html */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Game Container - Increase size and center */
    .game-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 50px 0;
        min-height: 500px;
    }
    
    #gameCanvas {
        max-width: 800px;
        width: 100%;
        height: auto;
        border-radius: 20px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    }
    
    /* Game Instructions - More uniform layout */
    .game-instructions {
        margin-top: 50px;
        padding: 50px 40px;
        border-radius: 20px;
    }
    
    .instructions-header {
        margin-bottom: 40px;
    }
    
    .instructions-header h3 {
        font-size: 32px;
    }
    
    .instructions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin-top: 0;
    }
    
    .instruction-item {
        padding: 30px 25px;
        border-radius: 16px;
        margin-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .instruction-icon {
        font-size: 40px;
        margin-bottom: 20px;
    }
    
    .instruction-content h4 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .instruction-content p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Game Section improvements for tablets */
    .game-section {
        padding: 80px 0;
    }
    
    .game-header {
        margin-bottom: 50px;
    }
    
    .game-title-section {
        gap: 25px;
    }
    
    .game-icon {
        font-size: 56px;
    }
    
    .game-text h2 {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .game-text p {
        font-size: 20px;
        line-height: 1.6;
    }
}

/* Game Canvas Mobile Improvements */
@media (max-width: 768px) {
    .game-container {
        margin: 20px 0;
    }
    
    #gameCanvas {
        width: 100% !important;
        max-width: 600px;
        height: auto !important;
        border-radius: 12px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    
    .game-instructions {
        margin-top: 30px;
        padding: 25px 20px;
    }
    
    .instructions-header {
        margin-bottom: 20px;
    }
    
    .instructions-header h3 {
        font-size: 22px;
    }
    
    .instruction-item {
        padding: 18px 15px;
        margin-bottom: 15px;
    }
    
    .instruction-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .instruction-content h4 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .instruction-content p {
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .game-container {
        margin: 15px 0;
    }
    
    #gameCanvas {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .game-instructions {
        margin-top: 25px;
        padding: 20px 15px;
    }
    
    .instructions-header h3 {
        font-size: 20px;
    }
    
    .instruction-item {
        padding: 15px 12px;
        margin-bottom: 12px;
    }
    
    .instruction-icon {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .instruction-content h4 {
        font-size: 15px;
        margin-bottom: 5px;
    }
    
    .instruction-content p {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Desktop-specific improvements for index.html */
@media (min-width: 1025px) {
    /* Header improvements for desktop */
    .header-info {
        flex-direction: row;
        gap: 25px;
        align-items: center;
    }
    
    .contact-info {
        font-size: 20px;
        font-weight: 500;
    }
}

/* Fireworks Canvas */
.fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.fireworks-canvas.active {
    display: block;
} 

/* Test Interface Styles */
.test-interface {
    padding: 40px 0;
    background: var(--warm-gradient);
    min-height: 100vh;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.test-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.test-info p {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
}

.test-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.question-container {
    margin-bottom: 40px;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.question-image {
    text-align: center;
    margin-bottom: 30px;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 60px;
}

.answer-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.answer-option.selected .option-label {
    background: white;
    color: var(--primary-color);
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
}

.test-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 15px;
    flex: 1;
    justify-content: center;
}

.finish-group {
    display: flex;
    justify-content: center;
}

.finish-btn {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.finish-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }
}

/* Mobile Responsive for Test Controls */
@media (max-width: 768px) {
    .test-controls {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .control-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .control-group .btn {
        flex: 1;
        max-width: 140px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .finish-group {
        width: 100%;
    }
    
    .finish-btn {
        width: 100%;
        max-width: 200px;
        padding: 14px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .test-controls {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .control-group {
        gap: 10px;
    }
    
    .control-group .btn {
        padding: 10px 12px;
        font-size: 13px;
        max-width: 120px;
    }
    
    .finish-btn {
        padding: 12px 16px;
        font-size: 14px;
        max-width: 180px;
    }
}

.question-navigation {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.nav-button {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.nav-button.current {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.nav-button.answered {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

/* Results Modal Styles */
.results-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.results-header {
    text-align: center;
    margin-bottom: 25px;
}

.results-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.results-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.results-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 24px;
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 600;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.results-message {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    background: var(--bg-light);
}

.pass-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
}

.fail-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.results-actions .btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.results-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Responsive for Results Modal */
@media (max-width: 768px) {
    .results-content {
        max-width: 95vw;
        max-height: 85vh;
        padding: 20px;
        margin: 20px;
    }
    
    .results-header {
        margin-bottom: 20px;
    }
    
    .results-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .results-header h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .results-header p {
        font-size: 14px;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 24px;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .results-message {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .results-actions {
        gap: 10px;
    }
    
    .results-actions .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .results-content {
        max-width: 98vw;
        max-height: 80vh;
        padding: 15px;
        margin: 10px;
    }
    
    .results-header {
        margin-bottom: 15px;
    }
    
    .results-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .results-header h2 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .results-header p {
        font-size: 13px;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 20px;
        margin-bottom: 3px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .results-message {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .results-actions {
        gap: 8px;
    }
    
    .results-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.stat-item.wrong-answers {
    background: #fef2f2;
    border: 2px solid #fecaca;
}

.stat-item.wrong-answers .stat-number {
    color: #dc2626;
}

.stat-item.unanswered {
    background: #fef3c7;
    border: 2px solid #fed7aa;
}

.stat-item.unanswered .stat-number {
    color: #d97706;
}

/* Image Slider Styles */
.image-slider {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    background: #f8f9fa; /* Fallback background */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

/* Fallback for images that fail to load */
.slide img:not([src]), 
.slide img[src=""],
.slide img[src*="error"] {
    display: none;
}

.slide:not(.active) {
    pointer-events: none;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    max-width: 100%;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dot.active {
    background: var(--secondary-color);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Mobile Responsive for Video and Image Slider */
@media (max-width: 768px) {
    .hero-image video {
        border-radius: 12px;
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    .video-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .video-controls .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .image-slider {
        border-radius: 12px;
    }
    
    .slide img {
        border-radius: 12px;
    }
    
    .slider-dots {
        margin-top: 12px;
        gap: 6px;
        max-width: 90%;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-image video {
        border-radius: 8px;
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    .video-controls {
        bottom: 10px;
        right: 10px;
    }
    
    .video-controls .btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .image-slider {
        border-radius: 8px;
    }
    
    .slide img {
        border-radius: 8px;
    }
    
    .slider-dots {
        margin-top: 10px;
        gap: 5px;
        max-width: 85%;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}