:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #6366f1;
    --accent-secondary: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Tło i Efekty */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 50%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    transform: translateX(-50%);
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Komponenty */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Typography & Header */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-secondary);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.hero {
    text-align: center;
    animation: fadeInDown 0.8s ease-out forwards;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Formularz */
.ask-section {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.125rem;
    padding: 1rem;
    resize: none;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.char-count {
    position: absolute;
    bottom: 0.8rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #4b5563;
    box-shadow: none;
}

/* Feed & Lista Pytan */
.feed-section {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.feed-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 100px;
    padding: 0.25rem;
    border: 1px solid var(--glass-border);
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Pojedyncze pytanie */
.question-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    transition: transform 0.2s, background 0.2s;
    animation: slideIn 0.4s ease-out forwards;
}

.question-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.vote-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.vote-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.vote-btn:hover:not(.voted) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.vote-btn.voted {
    background: rgba(236, 72, 153, 0.2);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.vote-btn.voted svg {
    fill: var(--accent-secondary);
    transform: scale(1.1);
}

.vote-count {
    margin-top: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.vote-count.hot {
    color: var(--accent-secondary);
}

.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-text {
    font-size: 1.125rem;
    font-weight: 500;
    word-break: break-word;
    margin-bottom: 0.5rem;
}

.question-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px dashed var(--glass-border);
}

.empty-state .emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

/* Animacje */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Footer Links */
.footer-links {
    margin-top: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.footer-links h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.link-card .icon {
    font-size: 1.25rem;
}

.link-card.accent-card {
    grid-column: 1 / -1;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    justify-content: center;
}

.link-card.accent-card:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .question-card {
        padding: 1rem;
    }
}

/* --- WCAG Widget --- */
.wcag-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wcag-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    outline: none;
}

.wcag-btn:hover,
.wcag-btn:focus-visible {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

.wcag-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: max-content;
    transform-origin: bottom right;
    transition: opacity 0.3s, transform 0.3s;
}

.wcag-menu.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.wcag-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
    font-family: 'Outfit', sans-serif;
}

.wcag-option:hover,
.wcag-option:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-primary);
    outline: none;
}

/* --- Stan Aktywny WCAG --- */

/* 1. Wysoki Kontrast */
body.wcag-high-contrast {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #dddddd;
    --accent-primary: #ffff00;
    --accent-secondary: #ffcc00;
}

body.wcag-high-contrast * {
    text-shadow: none !important;
}

body.wcag-high-contrast .glass-panel,
body.wcag-high-contrast textarea,
body.wcag-high-contrast input,
body.wcag-high-contrast .question-card {
    background: #000000 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* 2. Powiększony Tekst */
body.wcag-large-text {
    font-size: 130%;
}

body.wcag-large-text h1,
body.wcag-large-text h2,
body.wcag-large-text h3 {
    font-size: 140%;
}

body.wcag-large-text .btn-primary,
body.wcag-large-text .wcag-option,
body.wcag-large-text .link-card .text {
    font-size: 1.1rem;
}

/* 3. Podświetlenie Focusu (dla klawiatury) */
body.wcag-show-focus *:focus,
body.wcag-show-focus *:focus-visible {
    outline: 4px solid var(--accent-primary) !important;
    outline-offset: 3px !important;
}