:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --glow: rgba(99, 102, 241, 0.15);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
            radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.06), transparent 25%),
            radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.05), transparent 30%),
            radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.04), transparent 35%);
    animation: rotate 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.grain {
    position: fixed;
    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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 100px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
    box-shadow: var(--shadow);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    color: var(--text-primary);
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.lead {
    max-width: 680px;
    margin: 0 auto 3rem;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

section {
    padding: 6rem 0;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .grid.two { grid-template-columns: repeat(2, 1fr); }
    .grid.three { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.card p, .card ul {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.check-list li::before {
    content: "✓";
    color: var(--accent-tertiary);
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

code {
    font-family: inherit;
}

.feature-highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    padding: 3rem;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 50%);
    animation: pulse 4s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.feature-highlight h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.feature-highlight .code-block {
    position: relative;
    z-index: 1;
}

footer {
    text-align: center;
    padding: 4rem 0 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 6rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 100px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    animation: fadeInUp 1s ease 0.8s backwards;
}

.scroll-indicator::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 100px;
    animation: scroll 2s ease infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* Dokumentacja - dodatkowe style */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--accent-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.back-link:hover {
    transform: translateX(-4px);
    background: var(--surface-hover);
}

.note {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-left: 4px solid var(--accent-primary);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.note strong {
    color: var(--text-primary);
}

.styled-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.styled-list li {
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
}

.styled-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 16px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    border-bottom: 2px solid var(--border);
}

td {
    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--surface-hover);
}

.api-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .api-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.api-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.api-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.api-card h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--accent-primary);
    font-family: 'Fira Code', monospace;
}

.api-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.troubleshooting-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .troubleshooting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.trouble-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.trouble-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.trouble-card h4 {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.trouble-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}