:root {
    --pixel-size: 4px;
    --pac-blue: #2563eb;
    --pac-dark: #020617;
    --pac-accent: #38bdf8;
    --crt-green: #00ff41;
}

/* Global Reset & Layout Fixes */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    position: relative;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--pac-dark);
    color: white;
    cursor: none;
    image-rendering: pixelated;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }
    #cursor {
        display: none !important;
    }
}

/* Custom Cursor */
#cursor {
    width: 20px;
    height: 20px;
    background: white;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    image-rendering: pixelated;
    transition: transform 0.1s ease-out;
}

.pixel-font {
    font-family: 'DotGothic16', 'IBM Plex Sans Arabic', sans-serif;
}

/* Lenis Smooth Scroll CSS */
html.lenis, html.lenis body {
    height: auto;
}
.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis-stopped {
    overflow: hidden;
}
.lenis-scrolling iframe {
    pointer-events: none;
}

/* Backgrounds */
#nebula-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at center, #020617 0%, #000 100%);
}

.pixel-grid {
    background-image: 
        linear-gradient(to right, rgba(56, 189, 248, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(56, 189, 248, 0.02) 1px, transparent 1px);
    background-size: 24px 24px;
}

@media (min-width: 768px) {
    .pixel-grid {
        background-image: 
            linear-gradient(to right, rgba(56, 189, 248, 0.03) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
        background-size: 32px 32px;
    }
}

/* Advanced CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

.crt-screen {
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.99; }
}

.crt-curve {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 1001;
}

.scanline-bar {
    width: 100%;
    height: 100px;
    z-index: 1002;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100px; }
}

/* UI Elements */
.retro-title {
    display: inline-flex;
    align-items: baseline;
    line-height: 1.2;
    padding: 0.2em 0;
    background: linear-gradient(to bottom, #fff 0%, #fff 52%, #94a3b8 52%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(4px 4px 0px #2563eb);
    margin: 0;
    position: relative;
}

@media (min-width: 768px) {
    .retro-title {
        filter: drop-shadow(6px 6px 0px #2563eb);
    }
}

.t-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    border: 1px solid white;
    border-radius: 50%;
    font-family: 'DotGothic16', sans-serif;
    font-size: 0.25em; /* Smaller as requested */
    margin-left: -0.1em;
    transform: translateY(-1.1em); /* Adjusted to keep it in place at the top */
    image-rendering: pixelated;
    color: white;
    background: var(--pac-dark);
    -webkit-text-fill-color: white;
    box-shadow: 1.5px 1.5px 0px #2563eb;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .t-circle {
        font-size: 0.22em;
        margin-left: -0.08em;
        transform: translateY(-1em);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--crt-green);
    font-family: monospace;
    padding: 20px;
    transition: opacity 0.5s ease;
}

/* System Log */
#system-log {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 200px;
    height: 100px;
    background: rgba(0,0,0,0.8);
    border: 2px solid var(--pac-blue);
    padding: 8px;
    font-size: 8px;
    font-family: monospace;
    color: var(--crt-green);
    overflow: hidden;
    z-index: 500;
    pointer-events: none;
    display: flex;
    flex-direction: column-reverse;
}

@media (min-width: 768px) {
    #system-log {
        bottom: 20px;
        right: 20px;
        width: 300px;
        height: 150px;
        font-size: 10px;
        padding: 10px;
    }
}

.log-entry {
    margin-bottom: 4px;
    border-right: 2px solid var(--crt-green);
    padding-right: 5px;
    animation: log-fade 2s forwards;
}

@keyframes log-fade {
    from { opacity: 1; transform: translateX(10px); }
    to { opacity: 0.5; transform: translateX(0); }
}

/* Footer Enhancements */
.cyber-grid-footer {
    background-image: 
        linear-gradient(to right, rgba(37, 99, 235, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.footer-scanline {
    animation: scanline-move 4s linear infinite;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.8);
}

@keyframes scanline-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.footer-card {
    position: relative;
    overflow: hidden;
}

.footer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: 0.5s;
}

.footer-card:hover::before {
    left: 100%;
}

.footer-card:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
    transform: translateY(-5px);
}

/* Social Icon Buttons */
.social-icon-btn {
    width: 48px; /* Larger button */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.social-icon-btn img {
    width: 32px; /* Much larger icon */
    height: 32px;
    object-fit: contain;
    /* Removed filter to show original colors */
    opacity: 1; /* Full opacity */
    transition: all 0.3s ease;
}

.social-icon-btn:hover img {
    transform: scale(1.1);
}

/* Pixel Syria Flag (Revolution Flag) */
.pixel-flag {
    width: 24px;
    height: 15px;
    display: inline-block;
    position: relative;
    background: #fff; /* White middle */
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.1),
        /* Green stripe (top) - positive Y moves down from top edge */
        0 5px 0 #007A3D inset,
        /* Black stripe (bottom) - negative Y moves up from bottom edge */
        0 -5px 0 #000 inset;
}

.pixel-flag::before {
    /* Three red stars in the white middle stripe */
    content: '';
    position: absolute;
    top: 50%;
    left: 4px;
    width: 2px;
    height: 2px;
    background: #CE1126;
    transform: translateY(-50%);
    box-shadow: 6px 0 0 #CE1126, 12px 0 0 #CE1126;
}

/* Story Section */
.story-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px;
    padding-bottom: 100px;
}

@media (min-width: 768px) {
    .story-container {
        gap: 150px;
        padding-bottom: 200px;
    }
}

.story-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 30px;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
}

@media (min-width: 768px) {
    .story-card {
        padding: 60px;
    }
}

.story-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--pac-blue), transparent, var(--pac-accent));
    z-index: -1;
    opacity: 0.3;
}

.story-year {
    position: absolute;
    top: -20px;
    right: 20px;
    background: var(--pac-blue);
    padding: 5px 15px;
    font-family: 'DotGothic16', sans-serif;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .story-year {
        top: -30px;
        right: -30px;
        padding: 10px 20px;
        font-size: 1.5rem;
    }
}

.story-visual-hint {
    position: absolute;
    font-size: 8rem;
    opacity: 0.03;
    font-family: 'DotGothic16', sans-serif;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

@media (min-width: 768px) {
    .story-visual-hint {
        font-size: 15rem;
    }
}

.rpg-stat-container {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}

.glass-pixel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Projects Section */
.category-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid #334155;
    padding: 8px 16px;
    font-family: 'DotGothic16', sans-serif;
    transition: all 0.3s;
    cursor: pointer;
    color: #94a3b8;
}
.category-btn.active {
    background: var(--pac-blue);
    border-color: var(--pac-accent);
    box-shadow: 0 0 15px var(--pac-blue), 4px 4px 0px rgba(0,0,0,0.5);
    transform: translate(-2px, -2px);
    color: white;
}

/* Projects Section - Ultra Wow Redesign */
.pixel-card-container {
    perspective: 2000px;
}

.pixel-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2);
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible; /* Changed to visible for floating elements */
    height: 100%;
    backdrop-filter: blur(10px);
}

.pixel-card:hover {
    border-color: var(--pac-accent);
    box-shadow: 
        0 0 40px rgba(37, 99, 235, 0.3),
        inset 0 0 20px rgba(56, 189, 248, 0.1);
}

/* Corner Brackets */
.pixel-card::before,
.pixel-card::after,
.card-corners::before,
.card-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pac-blue);
    z-index: 20;
    transition: all 0.4s ease;
    pointer-events: none;
    opacity: 0.5;
}

/* Top Left */
.pixel-card::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

/* Top Right */
.pixel-card::after {
    top: -5px;
    right: -5px;
    border-left: none;
    border-bottom: none;
}

/* Bottom Left */
.card-corners::before {
    bottom: -5px;
    left: -5px;
    border-right: none;
    border-top: none;
}

/* Bottom Right */
.card-corners::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

.pixel-card:hover::before,
.pixel-card:hover::after,
.pixel-card:hover .card-corners::before,
.pixel-card:hover .card-corners::after {
    width: 40px;
    height: 40px;
    opacity: 1;
    border-color: var(--pac-accent);
    filter: drop-shadow(0 0 5px var(--pac-accent));
}

/* Digital Scanner Line */
.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pac-accent), transparent);
    z-index: 15;
    opacity: 0;
    pointer-events: none;
}

.pixel-card:hover .scanner-line {
    opacity: 1;
    animation: scan-move 2s linear infinite;
}

@keyframes scan-move {
    0% { top: 0%; }
    100% { top: 100%; }
}

/* 3D Layers */
.card-content-3d {
    transform-style: preserve-3d;
    height: 100%;
}

.layer-bg {
    transform: translateZ(20px);
}

.layer-icon {
    transform: translateZ(80px);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.pixel-card:hover .layer-icon {
    transform: translateZ(120px) scale(1.1);
}

.layer-text {
    transform: translateZ(50px);
}

/* Cyber Title Glitch */
.cyber-title {
    position: relative;
    display: inline-block;
}

.pixel-card:hover .cyber-title {
    animation: cyber-glitch 0.3s infinite;
    color: var(--pac-accent);
    text-shadow: 2px 2px var(--pac-blue), -2px -2px #ff00ff;
}

@keyframes cyber-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(-2px, -1px); }
    60% { transform: translate(2px, 1px); }
    80% { transform: translate(2px, -1px); }
    100% { transform: translate(0); }
}

/* Status Pulse Badge */
.status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 10px;
    font-size: 10px;
    font-family: 'DotGothic16', sans-serif;
    text-transform: uppercase;
    z-index: 30;
    transform: translateZ(60px);
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--pac-blue);
    color: var(--pac-accent);
}

.pixel-card:hover .status-badge {
    border-color: var(--pac-accent);
    box-shadow: 0 0 10px var(--pac-accent);
}

/* Waiting Pulse Fix */
@keyframes heartbeat {
    0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0px rgba(239, 68, 68, 0); }
    50% { transform: scale(1.02); opacity: 1; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
    100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0px rgba(239, 68, 68, 0); }
}

.waiting-pulse {
    animation: heartbeat 3s infinite ease-in-out;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.waiting-label {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    font-size: 10px;
    font-family: 'DotGothic16', sans-serif;
    box-shadow: 0 0 10px #ef4444;
}


.particle {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    image-rendering: pixelated;
}

/* Projects Section - Noise & Glow */
#projects {
    position: relative;
}

#projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

#projects-grid {
    position: relative;
    z-index: 2;
}

.section-highlight {
    position: relative;
}

.section-highlight::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 0;
    height: 4px;
    background: var(--pac-blue);
    transition: width 0.5s ease;
}

.section-highlight:hover::after {
    width: 100%;
}

#back-to-top {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav-link {
    transition: all 0.3s ease;
}

/* Project Showcase Modal */
#project-modal {
    perspective: 2000px;
}

#modal-content {
    transform-style: preserve-3d;
    box-shadow: 0 0 100px rgba(0,0,0,0.8), 0 0 30px rgba(37, 99, 235, 0.4);
}

#modal-image-container div {
    flex: 0 0 100%;
}

/* Animations */
@keyframes modal-glitch {
    0% { clip-path: inset(0 0 0 0); }
    5% { clip-path: inset(10% -6px 80% 0); }
    10% { clip-path: inset(0 0 0 0); }
    /* Add more steps for a real glitch effect */
}

.modal-glitch-active {
    animation: modal-glitch 0.2s steps(1);
}

/* Improved Quiet B&W Transition */
#crt-transition {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 5000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#crt-transition.active {
    opacity: 1;
    pointer-events: all;
}

.static-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.15;
    filter: grayscale(100%) contrast(150%);
    mix-blend-mode: screen;
}

.glitch-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
    background-size: 100% 200%;
    animation: scan-slow 2s linear infinite;
    pointer-events: none;
}

@keyframes scan-slow {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}

.glitch-active .glitch-overlay {
    background: white;
    opacity: 0.1;
    animation: flash-in-out 0.6s ease-in-out;
}

@keyframes flash-in-out {
    0% { opacity: 0; transform: scaleY(0); }
    50% { opacity: 0.2; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(0); }
}

/* TV Slider Styles */
.tv-container {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Increased from 800px to 1000px */
    margin: 0 auto;
    padding-bottom: 20px; /* Reduced since remote is now relative */
}

.tv-frame {
    position: relative;
    z-index: 10;
    pointer-events: none;
    width: 100%;
    height: auto;
    display: block;
}

/* Updated screen dimensions to match the larger TV scale */
.tv-screen-content {
    position: absolute;
    top: 10.8% !important; /* Force position */
    left: 25.8% !important;
    width: 50.5% !important;
    height: 65.5% !important;
    z-index: 5;
    overflow: hidden;
    border-radius: 50px;
}

/* Layer 1: Image Slider (Clean, No noise here) */
.tv-image-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tv-screen-content .slide-item {
    min-width: 100%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-screen-content img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 15px; /* Added padding to make the image smaller inside the frame */
    box-sizing: border-box; /* Ensure padding doesn't affect dimensions */
}

/* Layer 2: Visual Effects (Separate overlay) */
.tv-effects-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    height: 80%;
    width: 80%;
    right: 10%;
}

/* Realistic TV Static/Switch effect - Strictly inside its own layer */
.tv-static {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    z-index: 25;
    pointer-events: none;
}

.tv-static.active {
    animation: tv-switch 0.4s steps(4) forwards;
    opacity: 1;
}

@keyframes tv-switch {
    0% { 
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        filter: brightness(2) contrast(2);
        transform: scale(1);
    }
    50% { 
        background-color: #000;
        background-image: none;
        transform: scaleY(0.01) scaleX(1);
    }
    100% { 
        background-color: transparent;
        transform: scaleY(0) scaleX(0);
        opacity: 0;
    }
}

.tv-scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.06), 
        rgba(0, 255, 0, 0.02), 
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 3px, 3px 100%;
    z-index: 12;
    pointer-events: none;
}

/* TV Remote Control */
/* Increase Remote size slightly to match larger TV */
.tv-remote {
    position: relative;
    margin-top: 40px;
    left: 50% !important; /* Centering fix */
    transform: translateX(-50%) !important; /* Centering fix */
    width: 260px;
    height: 75px;
    background: #2c2c2c;
    border-radius: 18px;
    border: 4px solid #1a1a1a;
    box-shadow: 0 12px 0 #111, 0 20px 30px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    z-index: 20;
}

.remote-btn {
    width: 50px;
    height: 50px;
    background: #444;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 0 #222;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    user-select: none;
}

.remote-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #222;
}

.remote-btn.prev-btn { background: #555; }
.remote-btn.next-btn { background: #555; }
.remote-btn.power-btn { 
    background: #c0392b; 
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

@media (max-width: 1024px) {
    .tv-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .tv-container {
        width: 100% !important;
        max-width: 90% !important;
        margin: 0 auto !important;
        left: 0 !important;
        transform: none !important;
        margin-top: 10px !important;
        margin-bottom: 20px !important;
    }

    .tv-screen-content {
        top: -0.8% !important;
        left: 25.8% !important;
        width: 50.5% !important;
        height: 65.5% !important;
        border-radius: 10px !important;
    }

    .tv-remote {
        width: 200px;
        height: 60px;
        margin-top: 25px;
        padding: 0 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .remote-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .remote-btn.power-btn {
        width: 32px;
        height: 32px;
    }

    #p-title {
        font-size: 2.5rem;
    }

    #p-desc {
        font-size: 1.1rem;
        padding: 15px;
        border-right: 3px solid #2563eb;
    }
    
    .tv-btn {
        width: 30px;
        height: 30px;
    }
}

.remote-sensor {
    width: 10px;
    height: 10px;
    background: #900;
    border-radius: 50%;
    box-shadow: 0 0 5px #f00;
}

.tv-btn {
    position: absolute;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.tv-btn-next {
    right: 15%;
    top: 35%;
}

.tv-btn-prev {
    right: 15%;
    top: 48%;
}

/* Enhanced Project Link Button */
#p-link {
    position: relative;
    padding: 20px 60px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0 4px #2563eb, 0 10px 20px rgba(0,0,0,0.4);
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

#p-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

#p-link:hover {
    transform: scale(1.05) translateY(-5px);
    background: #1d4ed8;
    box-shadow: 0 0 0 6px #1d4ed8, 0 20px 40px rgba(0,0,0,0.5);
}

#p-link:hover::before {
    left: 100%;
}

#p-link:active {
    transform: scale(0.98) translateY(0);
}

/* Story-like description styling */
#p-desc {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #cbd5e1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    padding: 20px;
    background: rgba(15, 23, 42, 0.3);
    border-right: 4px solid #2563eb;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .tv-container {
        width: 100%;
        max-width: 90%;
        margin: 0 auto;
        left: 0;
        transform: none;
    }

    .tv-screen-content {
        top: 10.8%;
        left: 25.8%;
        width: 50.5%;
        height: 65.5%;
        border-radius: 8px;
    }

    .tv-remote {
        width: 200px;
        height: 60px;
        margin-top: 30px;
        left: 50%;
        transform: translateX(-50%);
    }



    .remote-btn.power-btn {
        width: 32px;
        height: 32px;
    }
}

