:root {
    --primary: #6366f1;
    --primary-light: #a5b4fc;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.light-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orb-float 20s infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #8b5cf6;
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 50px); }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

#drop-zone {
    margin-bottom: 30px;
    border: 2px dashed var(--glass-border);
    cursor: pointer;
}

#drop-zone:hover, #drop-zone.dragover {
    border-color: var(--primary);
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
}

.drop-content svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

.drop-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.drop-content p {
    color: var(--text-muted);
}

.hidden {
    display: none;
}

/* Animacje */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pasek postępu Premium */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin: 25px 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 15px var(--primary);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    position: relative;
}

/* Linia skanowania */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    box-shadow: 0 0 10px var(--primary-light);
    animation: scan 2s linear infinite;
    z-index: 10;
    opacity: 0;
}

.scanning .scan-line {
    opacity: 1;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(300px); opacity: 0; }
}
/* Matrix Rain */
#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
    pointer-events: none;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    text-align: left;
}

.result-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 16px;
}

.result-card.wide {
    grid-column: span 2;
}

.res-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.res-val {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
}

.res-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 10px;
}

/* Statystyki */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 15px 30px;
    border-radius: 16px;
    text-align: center;
    min-width: 140px;
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Przyciski */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: transform 0.2s, background 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

/* Historia */
.history-section {
    margin-top: 50px;
    width: 100%;
}

.history-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.history-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Stylizacja paska przewijania (scrollbar) dla lepszego efektu */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.history-date { color: var(--text-muted); font-size: 0.8rem; }
.history-type { font-weight: 600; color: var(--primary-light); }
.history-ip { font-family: monospace; }
.history-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.history-badge.fail {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

footer {
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 5px;
}

.help-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 800;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.help-circle:hover {
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    position: relative;
    padding: 40px;
    text-align: left;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.close-modal:hover { color: white; }

.help-steps {
    margin: 30px 0;
}

.step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-num {
    background: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.help-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* Corporate Branding */
.company-logo-area {
    margin-bottom: 10px;
}

.logo-placeholder {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 5px 15px;
    border-radius: 8px;
    letter-spacing: 2px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.btn-primary, .btn-secondary {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    margin: 0; /* Całkowity reset marginesów */
    padding: 0 25px;
    height: 48px;
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    border: 1px solid var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: white !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}
