/* === GLOBAL & RESET === */
:root { --cursor-size: 300px; }

body { 
    background-color: #030305; 
    color: #e2e8f0; 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: none; 
}

/* === TWIN BEAM ENGINE (Efekt świecących ramek) === */
.twin-beam-card {
    position: relative;
    background: #08090f;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateZ(0);
    transition: border-color 0.3s;
    height: 100%;
}

.twin-beam-card::after {
    content: "";
    position: absolute;
    inset: 2px; 
    background: #08090f;
    border-radius: 1.4rem;
    z-index: 1;
    pointer-events: none;
}

.beam-content { position: relative; z-index: 10; height: 100%; }

.twin-beam-card::before, 
.twin-beam-card .beam-second {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 300%; height: 300%;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity; 
}

.twin-beam-card.animating::before { animation: shoot-cw 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.twin-beam-card.animating .beam-second { animation: shoot-ccw 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* === ENTRY CARD & SPLASH SCREEN === */
.entry-card {
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-tap-highlight-color: transparent; 
}
.entry-card:hover { transform: scale(1.05); }
.entry-card .beam-content { background: rgba(8, 9, 15, 0.6); backdrop-filter: blur(20px); }

/* === ANIMACJE I KEYFRAMES === */
@keyframes entry-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(168, 85, 247, 0); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); }
}

@keyframes auto-rotate { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes shoot-cw { 0% { transform: translate(-50%, -50%) rotate(var(--angle)); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)); opacity: 0; } }
@keyframes shoot-ccw { 0% { transform: translate(-50%, -50%) rotate(var(--angle)); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(calc(var(--angle) - 180deg)); opacity: 0; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-pulse-once { animation: fade-in-up 0.3s ease-out forwards; }

/* === BEAM COLORS === */
.beam-purple::before, .beam-purple .beam-second { background: conic-gradient(from 0deg, transparent 0deg, transparent 320deg, #a855f7 360deg); }
.beam-cyan::before, .beam-cyan .beam-second { background: conic-gradient(from 0deg, transparent 0deg, transparent 320deg, #06b6d4 360deg); }
.beam-green::before, .beam-green .beam-second { background: conic-gradient(from 0deg, transparent 0deg, transparent 320deg, #10b981 360deg); }
.beam-red::before, .beam-red .beam-second { background: conic-gradient(from 0deg, transparent 0deg, transparent 320deg, #ef4444 360deg); }

/* === UI ELEMENTS === */
.agent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.agent-card:active, .agent-card:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }
.agent-card::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--agent-color); opacity: 0.3; transition: opacity 0.3s; }
.agent-card:active::after, .agent-card:hover::after { opacity: 1; box-shadow: 0 0 20px var(--agent-color); }

.hacker-text { font-family: 'Space Grotesk', sans-serif; cursor: default; }
.text-gradient { background: linear-gradient(to right, #a855f7, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.magnetic-btn { transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); cursor: pointer; }

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}
.glass-panel:active, .glass-panel:hover { background: rgba(255, 255, 255, 0.05); }

.section-container { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* === MODALS & NAVIGATION === */
#cart-modal, #contact-modal, #cookie-settings-modal { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#cart-modal.active, #contact-modal.active, #cookie-settings-modal.active { opacity: 1; pointer-events: all; }

#cursor-light { 
    position: fixed; top: 0; left: 0; width: var(--cursor-size); height: var(--cursor-size); 
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0,0,0,0) 70%); 
    transform: translate(-50%, -50%); pointer-events: none; z-index: 9999; mix-blend-mode: screen; 
}

#landing-page-content { display: none; opacity: 0; }
#splash-screen {
    position: fixed; inset: 0; z-index: 10000;
    background-color: #030305;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* === MOBILE OPTIMIZATIONS === */
.lang-switch { display: flex; gap: 0.5rem; align-items: center; margin-right: 1rem; }
.lang-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #64748b;
    cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: all 0.2s;
}
.lang-btn.active { color: #fff; background: rgba(255, 255, 255, 0.1); font-weight: bold; }
.lang-btn:hover:not(.active) { color: #cbd5e1; }

/* Fallbacki dla urządzeń dotykowych (Hover: none) */
@media (hover: none) {
    .twin-beam-card::before, 
    .twin-beam-card .beam-second {
        opacity: 0.6 !important;
        animation: auto-rotate 8s linear infinite !important;
    }
    .twin-beam-card .beam-second { animation-direction: reverse !important; }
    #cursor-light { display: none !important; } /* Oszczędzamy baterię na mobile */
    .entry-card { animation: entry-pulse 3s infinite ease-in-out; }
}