/* --- STYLIZACJA OGÓLNA I TŁO --- */
body { 
    background-color: #0b0d10;
    /* Subtelna techniczna siatka */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 36px 36px;
    background-attachment: fixed;
    color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Poświata za kursorem */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.09) 0%, rgba(220, 53, 69, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0; /* Niewidoczne w rogu przed pierwszym ruchem myszy */
    transition: opacity 0.3s ease;
}

/* Canvas w tle (cząsteczki) */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.tracking-widest { letter-spacing: 5px; }
.tracking-wider { letter-spacing: 2px; }

/* --- LISTA ZADAŃ --- */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.task-link {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: #8b929a;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease;
}

/* Neonowy boczny wskaźnik aktywnego zadania */
.task-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dc3545;
    transform: scaleY(0);
    transition: transform 0.2s ease;
    box-shadow: 0 0 10px #dc3545;
}

.task-link.active::before {
    transform: scaleY(1);
}

.task-num {
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: #555b63;
    width: 44px;
    transition: color 0.25s ease;
}

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

.task-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #d1d5db;
    transition: color 0.25s ease;
}

.task-sub {
    font-size: 0.75rem;
    color: #6c727c;
}

.task-link:hover,
.task-link.active {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.4);
    transform: translateX(8px);
    box-shadow: 0 4px 20px -5px rgba(220, 53, 69, 0.2);
}

.task-link:hover .task-num,
.task-link.active .task-num {
    color: #dc3545;
}

.task-link:hover .task-name,
.task-link.active .task-name {
    color: #ffffff;
}

/* --- KARTA PODGLĄDU Z AMBIENT GLOW --- */
.preview-wrapper {
    position: relative;
    perspective: 1000px;
}

.preview-ambient-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(220, 53, 69, 0.25) 0%, rgba(220, 53, 69, 0) 70%);
    filter: blur(40px);
    z-index: 0;
    border-radius: 30px;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.preview-card {
    position: relative;
    z-index: 1;
    background: rgba(18, 21, 26, 0.75);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s ease-out, border-color 0.3s ease;
    will-change: transform;
}

/* Status: dioda z pulsem */
.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #6c727c;
}

.status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: statusPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.6;
}

@keyframes statusPing {
    0% { transform: scale(1); opacity: 0.8; }
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

.preview-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
}

.preview-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    min-height: 2.3rem;
}

.preview-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #cbd5e1 !important;
    transition: opacity 0.15s ease;
}

.preview-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #9ca3af !important;
    min-height: 55px;
    transition: opacity 0.15s ease;
}

/* Plakietki technologii */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
    transition: opacity 0.15s ease;
}

.tag-pill {
    font-size: 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

/* --- PRZYCISK CTA Z SHIMMER (BŁYSKIEM) --- */
.btn-danger-custom {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e50914, #b20710);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 12px 26px;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-danger-custom::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        60deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transform: rotate(25deg);
    animation: btnShimmer 4s infinite;
}

@keyframes btnShimmer {
    0%, 70% { left: -60%; }
    100% { left: 140%; }
}

.btn-danger-custom:hover {
    background: linear-gradient(135deg, #f0141f, #c40912);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
}

.btn-danger-custom .arrow {
    transition: transform 0.2s ease;
}

.btn-danger-custom:hover .arrow {
    transform: translateX(5px);
}

/* Nagłówek i Stopka */
.header-subtitle {
    color: #9ca3af;
    letter-spacing: 2px;
}

footer {
    background-color: #08090b;
    margin-top: auto;
}