/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 255, 214, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Screen Transitions */
.screen {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.hidden {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Intro Screen */
.intro-content {
    text-align: center;
    padding: 40px 0;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #f093fb);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

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

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 400;
}

.intro-description {
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

.main-btn {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.main-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.5s;
}

.main-btn:hover::before {
    left: 100%;
}

.intro-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ecdc4;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Test Screen */
.test-header {
    margin-bottom: 40px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

#question-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    min-width: 50px;
}

.question-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.question-title {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #fff;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s;
}

.option:hover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.option:hover::before {
    left: 100%;
}

.option.selected {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(255, 107, 107, 0.1));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

/* Result Screen */
.result-content {
    text-align: center;
    padding: 20px 0;
}

.result-header {
    margin-bottom: 40px;
}

.result-title {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.mbti-badge {
    display: inline-block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.type-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

.result-details {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.type-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.type-traits {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trait-category h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #4ecdc4;
}

.trait-category ul {
    list-style: none;
    margin-left: 0;
}

.trait-category li {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 10px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid #4ecdc4;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.share-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    padding: 16px 30px;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 14px 30px;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

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

.question-card,
.result-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .question-card {
        padding: 30px 20px;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .intro-stats {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .stat {
        min-width: 70px;
        padding: 12px;
    }
    
    .type-traits {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .mbti-badge {
        font-size: 2.5rem;
    }
    
    .main-btn {
        padding: 14px 35px;
        font-size: 1rem;
    }
    
    .question-title {
        font-size: 1.1rem;
    }
    
    .option {
        padding: 16px;
        font-size: 0.95rem;
    }
}

/* Gender Screen */
.gender-content {
    text-align: center;
    padding: 40px 0;
}

.gender-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.gender-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.gender-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.gender-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.gender-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4ecdc4;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.3);
}

.gender-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 10px;
}

.gender-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Result Screen Updates */
.result-types {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.type-section {
    text-align: center;
}

.type-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.type-divider {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.teto-badge {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

/* Loading Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading {
    animation: pulse 1s ease-in-out infinite;
}