@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-white: #ffffff;
    
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 16px 64px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 24px 96px rgba(0, 0, 0, 0.2);
    
    --border-radius: 16px;
    --border-radius-large: 24px;
    
    --animation-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --animation-medium: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --animation-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--primary-gradient);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 80%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 70%;
    animation-delay: -10s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: -15s;
}

.shape:nth-child(5) {
    width: 140px;
    height: 140px;
    top: 20%;
    left: 60%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Intro Screen */
.intro-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.intro-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-large);
    padding: 60px 40px;
    box-shadow: var(--shadow-heavy);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp var(--animation-slow) ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-container {
    position: relative;
    margin-bottom: 40px;
}

.brain-icon {
    font-size: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.neural-network {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.neural-line {
    position: absolute;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transform-origin: center;
    animation: rotate 4s linear infinite;
}

.neural-line:nth-child(2) {
    animation-delay: 1.3s;
    transform: rotate(120deg);
}

.neural-line:nth-child(3) {
    animation-delay: 2.6s;
    transform: rotate(240deg);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: -2px;
}

.main-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 30px;
}

.intro-description {
    margin-bottom: 40px;
}

.intro-description p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.test-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 1.5rem;
    color: #667eea;
}

.stat span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.start-btn {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
    transition: all var(--animation-fast);
    box-shadow: var(--shadow-medium);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.start-btn:active {
    transform: translateY(-1px);
}

/* Test Screen */
.test-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.test-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
}

.progress-container {
    flex: 1;
    margin-right: 20px;
}

.progress-bar-bg {
    position: relative;
    height: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width var(--animation-medium);
    width: 0%;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.exit-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--animation-fast);
    color: var(--text-secondary);
}

.exit-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Question Card */
.question-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.question-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 50px;
    box-shadow: var(--shadow-medium);
    max-width: 700px;
    width: 100%;
    transform: translateY(20px);
    opacity: 0;
    animation: questionSlide var(--animation-medium) ease-out forwards;
}

@keyframes questionSlide {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.question-number {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--text-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.question-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.option {
    position: relative;
}

.option input[type="radio"] {
    display: none;
}

.option label {
    display: block;
    padding: 20px 10px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--animation-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.option label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left var(--animation-fast);
    z-index: -1;
}

.option label:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.option input[type="radio"]:checked + label {
    border-color: #667eea;
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.option input[type="radio"]:checked + label::before {
    left: 0;
}

.option-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.option-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Navigation */
.navigation-controls {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-btn {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid transparent;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--animation-fast);
    box-shadow: var(--shadow-light);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.nav-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.prev-btn:not(:disabled) {
    border-color: #95a5a6;
    color: var(--text-primary);
}

.next-btn:not(:disabled), .finish-btn {
    background: var(--primary-gradient);
    color: var(--text-white);
}

/* Results Screen - POPRAWIONA WERSJA */
.results-screen {
    min-height: 100vh;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    position: relative;
    z-index: 10;
}

.results-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-large);
    padding: 60px 40px;
    box-shadow: var(--shadow-heavy);
    text-align: center;
    max-width: 650px;
    width: 100%;
    transform: translateY(0);
    opacity: 1;
    position: relative;
    overflow: hidden;
}

/* Elegant gradient overlay for results */
.results-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
}

.results-header {
    margin-bottom: 40px;
    position: relative;
}

.trophy-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
    text-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.results-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--dark-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

/* Score Visualization - ULEPSZONA */
.score-visualization {
    margin-bottom: 40px;
    position: relative;
}

.score-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 8px 16px rgba(102, 126, 234, 0.2));
}

.score-bg {
    fill: none;
    stroke: rgba(102, 126, 234, 0.08);
    stroke-width: 10;
}

.score-fill {
    fill: none;
    stroke: #667eea;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 2.5s ease-out;
}

.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    text-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.score-max {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 5px;
}

/* Interpretation Card - ULEPSZONA */
.interpretation-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.04) 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius);
    padding: 35px;
    margin-bottom: 30px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.interpretation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.interpretation-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.interpretation-title i {
    font-size: 1.4rem;
}

.interpretation-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Detailed Analysis - ULEPSZONA */
.detailed-analysis {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.02) 100%);
    border: 1px solid rgba(102, 126, 234, 0.08);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    text-align: left;
}

.analysis-section {
    margin-bottom: 25px;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h4 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section h4 i {
    color: #667eea;
    font-size: 1rem;
}

.analysis-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.analysis-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.analysis-section li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
    font-size: 1rem;
}

/* Action Buttons - ULEPSZONE */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--animation-fast);
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn.primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-medium);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-light);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.action-btn:active {
    transform: translateY(-1px);
}

/* Utility Classes - POPRAWIONE */
.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Force visibility dla ekranu wyników */
#resultsScreen:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
}

#resultsScreen .results-content {
    display: block !important;
    visibility: visible !important;
}

/* Upewnij się że wszystkie elementy wyników są widoczne */
#finalScore,
#interpretationCard,
#detailedAnalysis {
    display: block !important;
    visibility: visible !important;
}

.fade-in {
    animation: fadeIn var(--animation-medium) ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .intro-content {
        padding: 40px 25px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .test-stats {
        gap: 20px;
    }
    
    .question-card {
        padding: 30px 25px;
    }
    
    .question-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .navigation-controls {
        flex-direction: column;
    }
    
    .results-content {
        padding: 40px 25px;
    }
    
    .results-header h1 {
        font-size: 2.2rem;
    }
    
    .score-circle {
        width: 180px;
        height: 180px;
    }
    
    .score-number {
        font-size: 2.8rem;
    }
    
    .interpretation-card,
    .detailed-analysis {
        padding: 25px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .question-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .trophy-icon {
        font-size: 2.8rem;
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .score-number {
        font-size: 2.4rem;
    }
}
/* DODAJ TE STYLE NA KOŃCU SWOJEGO styles.css ABY NAPRAWIĆ WIDOCZNOŚĆ */

/* Fix dla intro screen */
#introScreen:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
}

/* Fix dla test screen */
#testScreen:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
}

/* Fix dla results screen */
#resultsScreen:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
}

/* Upewnij się że wszystkie główne ekrany działają */
.intro-screen,
.test-screen,
.results-screen {
    position: relative;
    z-index: 1;
}

/* Override dla hidden class */
.intro-screen.hidden,
.test-screen.hidden,
.results-screen.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure intro content is visible */
.intro-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: block !important;
    visibility: visible !important;
}

/* Debug - sprawdź czy intro screen działa */
.intro-screen {
    background: rgba(0, 0, 0, 0.01); /* Prawie niewidoczne tło dla debugowania */
}