/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --text-dark: #2C3E50;
    --text-light: #546E7A;
    --white: #ffffff;
    --bg-light: #F0F4F8;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --scrollbar-width: 0px;
}

/* Prevent scrollbar flash on load */
html.loading {
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Fix scrollbar issue */
    overflow-y: auto;
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #FFE4E1 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto; /* Allow natural scrolling */
    line-height: 1.6;
    width: 100%;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.7);
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 144, 226, 0.5) rgba(0, 0, 0, 0.1);
}

/* Prevent horizontal scroll */
#home, section, .container {
    overflow-x: hidden;
}


/* Alternative: If you want home section to be exactly viewport height without scroll */
#home.full-viewport {
    min-height: 100vh;
    max-height: 100vh;
    padding-top: 80px; /* Adjust for navbar */
    padding-bottom: 0;
    overflow: hidden;
}

#home.full-viewport .home-content {
    height: calc(100vh - 80px); /* Full height minus navbar */
    overflow: hidden;
}


.home-content,
.about-content,
.contact-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.97) 0%, rgba(52, 73, 94, 0.97) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    will-change: transform;
    max-width: 100vw;
}

nav.scrolled {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.99) 0%, rgba(52, 73, 94, 0.99) 100%);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
    z-index: 1002;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
}

.logo-text {
    display: inline-block;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* CTA Button in Nav */
.nav-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.desktop-only {
    display: inline-block;
}

.mobile-cta {
    display: none;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative;
    width: 35px;
    height: 35px;
    z-index: 1002;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px auto;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.menu-toggle.active .hamburger:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger:last-child {
    transform: rotate(-45deg) translate(7px, -8px);
}

/* Mobile menu overlay - Fixed */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Body when menu is open - Fixed */
body.menu-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width);
}

/* Animated clouds - Performance optimized */
.cloud-layer {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.7;
    filter: blur(1px);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud-1 {
    width: 150px;
    height: 50px;
    top: 20%;
    left: -150px;
    animation: float-right 40s infinite linear;
}

.cloud-1::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 20px;
}

.cloud-1::after {
    width: 80px;
    height: 40px;
    top: -20px;
    right: 20px;
}

.cloud-2 {
    width: 200px;
    height: 60px;
    top: 10%;
    left: -200px;
    animation: float-right 50s infinite linear;
    animation-delay: -10s;
    opacity: 0.6;
}

.cloud-2::before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 40px;
}

.cloud-2::after {
    width: 100px;
    height: 50px;
    top: -25px;
    right: 30px;
}

.cloud-3 {
    width: 120px;
    height: 40px;
    top: 60%;
    left: -120px;
    animation: float-right 35s infinite linear;
    animation-delay: -20s;
}

.cloud-3::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-3::after {
    width: 60px;
    height: 35px;
    top: -15px;
    right: 15px;
}

.cloud-small {
    width: 80px;
    height: 30px;
    opacity: 0.5;
}

.cloud-small::before {
    width: 30px;
    height: 30px;
    top: -15px;
    left: 10px;
}

.cloud-small::after {
    width: 40px;
    height: 25px;
    top: -10px;
    right: 10px;
}

.cloud-4 {
    top: 40%;
    left: -80px;
    animation: float-right 30s infinite linear;
    animation-delay: -5s;
}

.cloud-5 {
    top: 80%;
    left: -80px;
    animation: float-right 25s infinite linear;
    animation-delay: -15s;
}

@keyframes float-right {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 300px)); }
}

/* Sun with rays - Performance optimized */
.sun-container {
    position: fixed;
    top: 10%;
    right: 10%;
    z-index: 1;
}

.sun {
    width: 80px;
    height: 80px;
    background: #FFD700;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: sun-glow 3s ease-in-out infinite;
}

.sun-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    animation: rotate 20s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.sun-ray {
    position: absolute;
    width: 3px;
    height: 20px;
    background: rgba(255, 215, 0, 0.6);
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.sun-ray:nth-child(2) { transform: translateX(-50%) rotate(45deg); }
.sun-ray:nth-child(3) { transform: translateX(-50%) rotate(90deg); }
.sun-ray:nth-child(4) { transform: translateX(-50%) rotate(135deg); }
.sun-ray:nth-child(5) { transform: translateX(-50%) rotate(180deg); }
.sun-ray:nth-child(6) { transform: translateX(-50%) rotate(225deg); }
.sun-ray:nth-child(7) { transform: translateX(-50%) rotate(270deg); }
.sun-ray:nth-child(8) { transform: translateX(-50%) rotate(315deg); }

@keyframes sun-glow {
    0%, 100% { box-shadow: 0 0 50px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 80px rgba(255, 215, 0, 0.8); }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Stars - Performance optimized */
.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 3s ease-in-out infinite;
    will-change: opacity;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Section styling */
section {
    position: relative;
    z-index: 10;
    padding: 80px 0;
    min-height: auto;
    height: auto;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

/* Home section */
#home {
    padding-top: 120px;
    position: relative;
    min-height: calc(100vh - 120px); /* Adjust based on actual content height */
    height: auto;
    overflow: hidden;
}

.home-content {
    display: flex;
    align-items: center;
    gap: 5%;
}

/* Background shapes - Performance optimized */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float-shape 20s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -200px;
    left: -200px;
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

.brand-section {
    flex: 1;
    opacity: 0;
    animation: fade-in-up 1s ease-out 0.5s forwards;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    animation: logo-float 3s ease-in-out infinite;
    margin-bottom: 2rem;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    animation: underline-grow 1s ease-out 1s forwards;
}

@keyframes underline-grow {
    to { transform: scaleX(1); }
}

.tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    opacity: 0;
    animation: fade-in 1s ease-out 0.8s forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-in-up 1s ease-out 1s forwards;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Game section */
/* Enhanced Game section - Updated with larger board size */
.game-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0;
    animation: fade-in-up 1s ease-out 0.7s forwards;
    position: relative;
    padding: 20px 0;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.game-info {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.info-box {
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.2), transparent);
    transition: left 0.5s ease;
}

.info-box:hover::before {
    left: 100%;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.score {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.level {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Game board with glow effect */
.game-board {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.game-board::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.game-board:hover::before {
    opacity: 0.5;
}

/* Larger board grid - 35px cells */
.board-grid {
    display: grid;
    grid-template-columns: repeat(10, 35px);
    grid-template-rows: repeat(15, 35px);
    gap: 2px;
    background: var(--bg-light);
    padding: 10px;
    border-radius: 15px;
}

.cell {
    background: white;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.cell.filled {
    animation: block-place 0.3s ease;
}

/* Game controls for mobile */
.game-controls {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.game-btn {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.game-btn:active {
    transform: scale(0.95);
    background: var(--primary-color);
    color: white;
}

@keyframes block-place {
    0% { transform: scale(0.8) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.cell.clearing {
    animation: block-clear 0.5s ease;
}

@keyframes block-clear {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

/* Enhanced Block colors with gradients */
.block-1 { 
    background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-2 { 
    background: linear-gradient(135deg, #4ECDC4, #44A08D) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-3 { 
    background: linear-gradient(135deg, #FFE66D, #FFD93D) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-4 { 
    background: linear-gradient(135deg, #A8E6CF, #7FD1B9) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-5 { 
    background: linear-gradient(135deg, #C7CEEA, #B2B7E0) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-6 { 
    background: linear-gradient(135deg, #FF6B9D, #FE5196) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-7 { 
    background: linear-gradient(135deg, #667EEA, #764BA2) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments for larger board */
@media (max-width: 1024px) {
    .board-grid {
        grid-template-columns: repeat(10, 30px);
        grid-template-rows: repeat(15, 30px);
    }
}

@media (max-width: 768px) {
    .game-section {
        width: 100%;
        padding: 0 10px;
    }
    
    .game-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .game-info {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .info-box {
        padding: 12px 24px;
    }
    
    .game-board {
        padding: 15px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Smaller cells on mobile */
    .board-grid {
        grid-template-columns: repeat(10, 25px);
        grid-template-rows: repeat(15, 25px);
        gap: 1.5px;
        padding: 8px;
    }
    
    .game-controls {
        display: grid;
    }
}

@media (max-width: 480px) {
    .game-info {
        gap: 10px;
    }
    
    .info-box {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }
    
    .game-board {
        padding: 10px;
    }
    
    /* Even smaller on mobile phones */
    .board-grid {
        grid-template-columns: repeat(10, 22px);
        grid-template-rows: repeat(15, 22px);
        gap: 1px;
        padding: 6px;
    }
}

@media (max-width: 360px) {
    .board-grid {
        grid-template-columns: repeat(10, 20px);
        grid-template-rows: repeat(15, 20px);
    }
    
    .game-controls .game-btn {
        padding: 12px;
        font-size: 1.2rem;
    }
}

/* Height-based media queries for landscape and small screens */
@media (max-height: 800px) {
    .board-grid {
        grid-template-columns: repeat(10, 28px);
        grid-template-rows: repeat(15, 28px);
    }
}

@media (max-height: 700px) {
    .game-info {
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .info-box {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, 22px);
        grid-template-rows: repeat(15, 22px);
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .board-grid {
        grid-template-columns: repeat(10, 18px);
        grid-template-rows: repeat(15, 18px);
    }
    
    .game-board {
        padding: 10px;
    }
}

/* Game controls for mobile */
.game-controls {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.game-btn {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.game-btn:active {
    transform: scale(0.95);
    background: var(--primary-color);
    color: white;
}

@keyframes block-place {
    0% { transform: scale(0.8) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.cell.clearing {
    animation: block-clear 0.5s ease;
}

@keyframes block-clear {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

/* Block colors */
.block-1 { 
    background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-2 { 
    background: linear-gradient(135deg, #4ECDC4, #44A08D) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-3 { 
    background: linear-gradient(135deg, #FFE66D, #FFD93D) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-4 { 
    background: linear-gradient(135deg, #A8E6CF, #7FD1B9) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-5 { 
    background: linear-gradient(135deg, #C7CEEA, #B2B7E0) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-6 { 
    background: linear-gradient(135deg, #FF6B9D, #FE5196) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.block-7 { 
    background: linear-gradient(135deg, #667EEA, #764BA2) !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* About Section */
#about {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-image {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image::before {
    content: '☁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    opacity: 0.3;
    animation: float-rotate 10s ease-in-out infinite;
}

@keyframes float-rotate {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-50%, -60%) rotate(10deg) scale(1.1); }
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.stat-card:hover::before {
    top: -100%;
    left: -100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Services Section */
#services {
    background: transparent;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
}

.service-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-description {
    color: var(--text-light);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.about-image {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove the cloud emoji */
.about-image::before {
    display: none;
}

/* Logo styling */
.about-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
    animation: float-rotate 10s ease-in-out infinite;
}

@keyframes float-rotate {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-20px) rotate(5deg) scale(1.1); }
}


/* Portfolio Section */
#portfolio {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #E0E0E0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-light);
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* .portfolio-image {
    height: 300px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    transition: all 0.3s ease;
} */

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}


.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;

}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}



.portfolio-content {
    padding: 2rem;
}

.portfolio-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.portfolio-description {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

/* Blog Section */
#blog {
    background: transparent;
    position: relative;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.blog-card:hover .blog-image::after {
    top: -100%;
    left: -100%;
}

.blog-content {
    padding: 2rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-date,
.blog-author {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.blog-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.blog-title:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.blog-tag {
    padding: 5px 12px;
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.85rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 10px;
}

/* Contact Section */
#contact {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-text h3 {
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-text p {
    color: var(--text-light);
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: #FAFAFA;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.map-container {
    grid-column: 1 / -1;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: map-pulse 2s ease-in-out infinite;
}

@keyframes map-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: white;
    transform: skewY(-2deg);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    position: relative;
    padding-left: 15px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.3rem;
    border: 2px solid transparent;
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: white;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    font-size: 1.5rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
}

/* Responsive Design - Mobile Navigation Fixed */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }
    
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 300px !important;
        height: 100vh !important;
        background: linear-gradient(135deg, rgba(44, 62, 80, 0.98) 0%, rgba(52, 73, 94, 0.98) 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 80px 0 30px 0 !important;
        transition: right 0.3s ease !important;
        z-index: 1001 !important;
        overflow-y: auto !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3) !important;
    }
    
    .nav-menu.active {
        right: 0 !important;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .nav-link {
        padding: 18px 30px !important;
        display: block !important;
        width: 100% !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: white !important;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Rest of responsive styles remain the same... */

/* Large Tablets and Small Laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 4%;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    .services-grid,
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .board-grid {
    grid-template-columns: repeat(10, 22px); /* Reduced from 25px */
    grid-template-rows: repeat(15, 22px);
    }
}

/* Tablets */
@media (max-width: 768px) {
    
    /* Sections */
    section {
        padding: 60px 0;
        min-height: auto;
    }
    
    #home {
        padding-top: 100px;
        min-height: auto;
         padding-bottom: 60px;
    }
    
    .home-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .brand-section,
    .game-section {
        width: 100%;
    }
    
    h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .tagline {
        text-align: center;
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    /* Game adjustments */
    .game-wrapper {
        max-width: 500px;
        padding: 0 10px;
    }
    
    .game-board {
        padding: 10px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, minmax(20px, 1fr));
        grid-template-rows: repeat(15, minmax(20px, 1fr));
        gap: 1px;
        padding: 5px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .game-controls {
        display: grid;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        height: 300px;
        order: -1;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Portfolio */
    .portfolio-filters {
        gap: 0.5rem;
        padding: 0 10px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    /* Sun */
    .sun-container {
        right: 5%;
        top: 15%;
    }
    
    .sun {
        width: 60px;
        height: 60px;
    }
    
    .sun-rays {
        width: 90px;
        height: 90px;
    }
    
    .sun-ray {
        height: 15px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    /* Container padding */
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0.8rem 15px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .nav-menu {
        padding-top: 70px;
    }
    
    .nav-link {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    /* Home section */
    #home {
        padding-top: 80px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    /* Game Board - Mobile optimized */
    .game-section {
        width: 100%;
        padding: 0 10px;
    }
    
    .game-wrapper {
        width: 100%;
    }
    
    .game-info {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .info-box {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }
    
    .game-board {
        padding: 10px;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, minmax(20px, 1fr));
        grid-template-rows: repeat(15, minmax(20px, 1fr));
        gap: 1px;
        padding: 5px;
        width: 100%;
        aspect-ratio: 10/15;
    }
    
    /* Cards */
    .service-card,
    .portfolio-item,
    .blog-card {
        padding: 1.5rem;
        margin: 0 10px;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Map */
    .map-container {
        height: 250px;
        font-size: 1.5rem;
        margin: 2rem -15px 0;
        border-radius: 0;
    }
    
    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
    
    /* Clouds */
    .cloud-1,
    .cloud-2,
    .cloud-3 {
        transform: scale(0.6);
    }
    
    /* Background shapes */
    .bg-shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .bg-shape-2 {
        width: 150px;
        height: 150px;
    }
    
    /* Footer */
    .footer-section {
        padding: 0 10px;
    }
    
    .newsletter-form input {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, minmax(18px, 1fr));
        grid-template-rows: repeat(15, minmax(18px, 1fr));
    }
    
    .game-controls .game-btn {
        padding: 12px;
        font-size: 1.2rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .portfolio-image,
    .blog-image {
        height: 150px;
        font-size: 2rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 40px 0;
    }
    
    #home {
        padding-top: 80px;
    }
    
    .home-content {
        flex-direction: row;
        gap: 3rem;
    }
    
    .game-wrapper {
        max-height: 400px;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, 18px);
        grid-template-rows: repeat(15, 18px);
    }
    
    .about-image {
        height: 250px;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    nav,
    .game-section,
    .back-to-top,
    .cloud-layer,
    .stars,
    .sun-container,
    .bg-shape,
    .social-links,
    .newsletter-form {
        display: none !important;
    }
    
    /* Reset colors for print */
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    .btn {
        border: 1px solid black;
        color: black;
    }
    
    /* Ensure text is visible */
    .highlight {
        -webkit-text-fill-color: black;
        background: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #E0E0E0;
        --text-light: #B0B0B0;
        --bg-light: #1A1A1A;
    }
    
    body {
        background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 50%, #3a3a3a 100%);
    }
    
    nav {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .info-box,
    .stat-card,
    .service-card,
    .portfolio-item,
    .blog-card,
    .contact-item,
    .contact-form {
        background: rgba(40, 40, 40, 0.9);
        color: #E0E0E0;
    }
    
    .cell {
        background: #2d2d2d;
    }
    
    .form-group input,
    .form-group textarea {
        background: #2d2d2d;
        color: #E0E0E0;
        border-color: #444;
    }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(74, 144, 226, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-height: 800px) {
    #home {
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: clamp(1.8rem, 4vw, 3rem);
        margin-bottom: 0.8rem;
    }
    
    .tagline {
        font-size: clamp(0.9rem, 1.8vw, 1.2rem);
        margin-bottom: 2rem;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, 20px);
        grid-template-rows: repeat(15, 20px);
        gap: 1px;
    }
}

@media (max-height: 700px) {
    .game-info {
        gap: 15px;
    }
    
    .info-box {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .board-grid {
        grid-template-columns: repeat(10, 18px);
        grid-template-rows: repeat(15, 18px);
    }
}

/* Fix game board scaling on mobile */
@media screen and (max-width: 600px) {
    .game-board {
        width: calc(100vw - 40px);
        max-width: 450px;
        margin: 0 auto;
        position: relative;
        padding: 0;
        overflow: visible;
    }
    
    .board-grid {
        --scale: calc((100vw - 80px) / 377px);
        transform: scale(var(--scale));
        transform-origin: center;
        margin: 20px;
    }
    
    /* Make sure cells fill the grid */
    .cell {
        width: 100%;
        height: 100%;
    }
}

/* iPhone specific fix */
@media screen and (max-width: 430px) {
    .board-grid {
        transform: scale(0.85);
        transform-origin: center;
    }
    
    .game-board {
        height: 500px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}