/* ============================================
   Miwnix Tech — Homepage (index.html)
   ============================================ */

/* --- Interaction Toggle --- */
.interaction-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    height: 100%;
    margin-bottom: 20px;
    /* Match button height if possible */
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch.active::after {
    transform: translateX(20px);
}


/* --- Section 1: Hero --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    padding-bottom: 60px;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* --- Hero Grid & Cube Element --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.cube-wrapper {
    perspective: 800px;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.cube-wrapper:active {
    cursor: grabbing;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cube-spin 15s infinite linear;
}

.cube .face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid var(--primary);
    background: rgba(0, 242, 255, 0.05);
    /* Soft primary tint */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
    font-weight: 800;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15) inset;
    backdrop-filter: blur(4px);
}

[data-theme="sunset"] .cube .face {
    background: rgba(255, 77, 77, 0.05);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.15) inset;
}

[data-theme="ocean"] .cube .face {
    background: rgba(0, 180, 216, 0.05);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.15) inset;
}

.cube .front {
    transform: rotateY(0deg) translateZ(150px);
}

.cube .back {
    transform: rotateY(180deg) translateZ(150px);
}

.cube .right {
    transform: rotateY(90deg) translateZ(150px);
}

.cube .left {
    transform: rotateY(-90deg) translateZ(150px);
}

.cube .top {
    transform: rotateX(90deg) translateZ(150px);
}

.cube .bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

@keyframes cube-spin {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        margin: 0 auto;
    }

    .cube-wrapper {
        margin-top: 30px;
        transform: scale(0.8);
        transform-origin: center top;
        margin-bottom: -60px;
    }

    .cta-group {
        justify-content: center;
    }
}

/* --- Section 2: Features --- */
#features {
    background: radial-gradient(circle at center, rgba(189, 0, 255, 0.1) 0%, transparent 70%);
}

/* --- Section 3: Architecture (Jamstack) --- */
#architecture {
    display: flex;
    align-items: center;
    gap: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

.tech-visual {
    flex: 1;
    height: 400px;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.05) 0%, transparent 70%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Grid Background Effect */
.tech-visual::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
    top: -50%;
    z-index: 0;
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(30px);
    }
}

.tech-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    position: absolute;
    backdrop-filter: blur(5px);
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.orbit-center {
    width: 140px;
    height: 140px;
    font-size: 1.2rem;
    font-weight: 800;
    z-index: 10;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(189, 0, 255, 0.1));
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 20px rgba(0, 242, 255, 0.1);
    animation: pulse-core 3s ease-in-out infinite;
}

/* Connection Lines (Simulated) */
.orbit-center::before,
.orbit-center::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform-origin: left center;
    opacity: 0.3;
    z-index: -1;
    animation: rotate-lines 10s linear infinite;
}

.orbit-center::after {
    width: 180px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    animation: rotate-lines 8s linear infinite reverse;
}

.orbit-3 {
    top: 50%;
    left: 5%;
    border-color: #61DAFB;
    /* React Blue */
    box-shadow: 0 0 15px rgba(97, 218, 251, 0.4);
    animation: float-3 8s ease-in-out infinite 0.2s;
}

.orbit-4 {
    top: 15%;
    right: 15%;
    border-color: #00DC82;
    /* Nuxt Green */
    background: rgba(0, 220, 130, 0.1);
    box-shadow: 0 0 15px rgba(0, 220, 130, 0.3);
    animation: float-4 9s ease-in-out infinite 1.5s;
}

@keyframes float-4 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-15px, -15px);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(15px, 15px);
    }
}

@keyframes float-4 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-15px, -15px);
    }
}



@keyframes rotate-lines {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-core {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 20px rgba(0, 242, 255, 0.1);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 50px rgba(0, 242, 255, 0.4), inset 0 0 30px rgba(0, 242, 255, 0.2);
        transform: scale(1.05);
    }
}

.orbit-1 {
    top: 15%;
    left: 10%;
    border-color: var(--primary);
    animation: float-1 6s ease-in-out infinite;
}

.orbit-1::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    top: -5px;
    right: 10px;
    box-shadow: 0 0 10px var(--primary);
    animation: electron-orbit 2s linear infinite;
}

.orbit-2 {
    bottom: 15%;
    right: 10%;
    border-color: var(--secondary);
    animation: float-2 7s ease-in-out infinite 0.5s;
}

.orbit-2::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    bottom: -4px;
    left: 10px;
    box-shadow: 0 0 10px var(--secondary);
    animation: electron-orbit 3s linear infinite reverse;
}


@keyframes float-1 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(20px) translateX(-10px);
    }
}

@keyframes electron-orbit {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0.5;
    }
}

.arch-content {
    flex: 1;
}

/* --- Section: Tech Stack Marquee --- */
#tech-stack {
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}

#tech-stack::before,
#tech-stack::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#tech-stack::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

#tech-stack::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.marquee-track {
    display: flex;
    gap: 60px;
    animation: marquee-scroll 25s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 90px;
    opacity: 0.5;
    transition: all 0.4s ease;
    cursor: default;
}

.tech-item:hover {
    opacity: 1;
    transform: scale(1.15);
}

.tech-item i {
    font-size: 2.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.4));
}

.tech-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Section: Stats Counter --- */
#stats {
    background: radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.06) 0%, transparent 60%);
}

/* --- Blog Slider (Horizontal Scroll) --- */
.slider-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    /* Space for arrows */
}

.blog-slider {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Hide scrollbar by default for cleaner look, control via arrows */
    scrollbar-width: none;
}

.blog-slider::-webkit-scrollbar {
    display: none;
}

.blog-slider .blog-card {
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: center;
    flex: 0 0 auto;
}

/* Slider Controls */
.blog-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.blog-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    /* Add some space below description */
}

.slide-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-arrow:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    border-color: var(--primary);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .slider-wrapper {
        padding: 0;
    }

    /* .slide-arrow {
        display: none; 
    } */

    .blog-slider {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 242, 255, 0.2);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* --- Section: Process / How We Work --- */
#process {
    background: radial-gradient(circle at 20% 50%, rgba(189, 0, 255, 0.06) 0%, transparent 60%);
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 60px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    opacity: 0.3;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 15px;
}

.step-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(0, 242, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.5s ease;
    position: relative;
}

.step-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(var(--primary), var(--secondary), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.process-step:hover .step-circle {
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    transform: scale(1.1);
}

.process-step:hover .step-circle::before {
    opacity: 0.4;
}

.step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #000;
}

.process-step h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Section: Testimonials --- */
#testimonials {
    background: radial-gradient(circle at 80% 50%, rgba(189, 0, 255, 0.06) 0%, transparent 60%);
}

.testimonial-grid {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Hide scrollbar */
}

.testimonial-grid::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: center;
    flex: 0 0 auto;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 35px 30px;
    position: relative;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    border-color: rgba(189, 0, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-quote-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(189, 0, 255, 0.3));
}

.testimonial-text {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #000;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.author-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.testimonial-stars {
    color: #ffd700;
    font-size: 0.85rem;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

/* --- Footer Subscribe Form --- */
.footer-subscribe {
    margin-bottom: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-subscribe h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.footer-subscribe p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-subscribe form {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.footer-subscribe .input-field {
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 25px;
}

.footer-subscribe .btn {
    border-radius: 50px;
    padding: 12px 30px;
    white-space: nowrap;
}

/* --- Section 5: Contact --- */
#contact {
    text-align: center;
    padding-bottom: 100px;
    background: linear-gradient(180deg, transparent, rgba(0, 242, 255, 0.05));
}

.newsletter-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.input-field {
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 100%;
    flex: 1;
    outline: none;
    transition: var(--transition);
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* --- Game Modal --- */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.game-modal.active {
    display: flex;
}

.game-ui {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    z-index: 10002;
}

.game-ui h2 {
    font-size: 2.5rem;
    text-shadow: 0 0 10px #00f2ff, 0 0 20px #00f2ff;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.game-score {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-family: 'Share Tech Mono', monospace;
}

.game-container {
    position: relative;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    z-index: 10002;
    background: #000;
}

.close-game {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
    line-height: 1;
}

.close-game:hover {
    color: #ff0055;
    text-shadow: 0 0 15px #ff0055;
    transform: scale(1.1);
}

/* Mobile Controls */
.game-controls-mobile {
    display: none;
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(2, 60px);
    gap: 15px;
    margin-top: 30px;
    z-index: 10002;
}

.d-pad-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.d-pad-btn:active {
    background: rgba(0, 242, 255, 0.3);
    transform: scale(0.95);
}

#btn-up {
    grid-column: 2;
    grid-row: 1;
}

#btn-left {
    grid-column: 1;
    grid-row: 2;
}

#btn-down {
    grid-column: 2;
    grid-row: 2;
}

#btn-right {
    grid-column: 3;
    grid-row: 2;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    #architecture {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .tech-visual {
        width: 100%;
        min-height: 400px;
        flex: none;
        /* Prevent collapse in column layout */
    }

    .newsletter-form {
        width: 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .footer-subscribe form {
        flex-direction: column !important;
        max-width: 100% !important;
    }

    .footer-subscribe .input-field {
        width: 100% !important;
    }

    .footer-subscribe button {
        width: 100% !important;
    }

    .input-field {
        width: 100%;
    }
}

/* --- Mobile Utilities --- */
.mobile-break {
    display: none;
}

@media screen and (max-width: 768px) {
    .hero-title {
        margin-bottom: 15px;
        font-size: 1.8rem;
    }

    .hero-subtitle {
        margin-bottom: 20px;
        font-size: 0.85rem;
    }

    .cube-wrapper {
        transform: scale(0.45);
        margin-bottom: -130px;
    }

    .cta-group .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .interaction-toggle {
        margin-bottom: 20px;
        margin-left: auto;
        margin-right: auto;
        transform: scale(0.85);
    }

    .mobile-break {
        display: block;
    }

    .text-center-mobile {
        text-align: center !important;
    }


    /* Force grids to stack vertically */
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .game-modal {
        justify-content: flex-start;
        padding-top: 80px;
    }

    .game-container canvas {
        width: 300px;
        height: 300px;
    }

    .game-ui h2 {
        font-size: 2rem;
    }

    .game-controls-mobile {
        display: grid;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .process-timeline {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .process-timeline::before {
        top: 0;
        left: 50%;
        width: 2px;
        height: 100%;
        transform: translateX(-50%);
    }

    .step-circle {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}

/* --- Mobile Slider (Scroll Snap) --- */
@media (max-width: 768px) {

    /* Testimonials Slider */
    .testimonial-grid,
    #blog .grid-3 {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }

    .testimonial-card,
    #blog .blog-card {
        flex: 0 0 85%;
        min-width: 280px;
        scroll-snap-align: center;
    }

    /* Hide Scrollbar */
    .testimonial-grid::-webkit-scrollbar,
    #blog .grid-3::-webkit-scrollbar {
        display: none;
    }
}

/* --- Small Mobile Adjustment (Prevent Overflow) --- */
@media (max-width: 480px) {
    .stat-card {
        padding: 20px 5px !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
        letter-spacing: 0px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stats-grid {
        gap: 10px !important;
    }

    .stat-number {
        font-size: 1.8rem !important;
    }
}