/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #0a0a0a;
    background: #f8fafc;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 107, 53, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(6, 255, 165, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(247, 147, 30, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 24px 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.language-switcher {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s ease;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dropdown-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dropdown-toggle i:first-child {
    color: #64748b;
}

.dropdown-toggle i:last-child {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    transition: transform 0.3s ease;
}

.dropdown.open .dropdown-toggle i:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.dropdown-item.active {
    background: #1e293b;
    color: white;
}

.dropdown-item.active:hover {
    background: #334155;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
}

/* Main content styles */
.main-content {
    flex: 1;
    background: #ffffff;
    border-radius: 20px;
    padding: 80px 60px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ffd23f);
    border-radius: 0 0 8px 8px;
}

.intro-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 32px;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.1;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ffd23f);
    border-radius: 2px;
}

.welcome-message {
    font-size: 1.4rem;
    color: #475569;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
}

/* Reflection section styles */
.reflection-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 50px;
}

.question-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    border-left: 6px solid transparent;
}

.question-card:nth-child(1) {
    border-left-color: #ff6b35;
}

.question-card:nth-child(2) {
    border-left-color: #f7931e;
}

.question-card:nth-child(3) {
    border-left-color: #06ffa5;
}

.question-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.question-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    line-height: 1.3;
    position: relative;
    padding-left: 40px;
}

.question-title:before {
    content: "○";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    font-weight: 900;
    color: #64748b;
}

.question-card:nth-child(1) .question-title:before {
    color: #ff6b35;
}

.question-card:nth-child(2) .question-title:before {
    color: #f7931e;
}

.question-card:nth-child(3) .question-title:before {
    color: #06ffa5;
}

.answer-content p {
    font-size: 1.2rem;
    color: #475569;
    line-height: 1.8;
    text-align: left;
    font-weight: 400;
}

/* Footer styles */
.page-footer {
    text-align: center;
    padding: 48px 0 24px;
    border-top: 2px solid #f1f5f9;
    margin-top: 60px;
    background: #f8fafc;
    border-radius: 16px;
}

.footer-text {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.6;
}

.current-language {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#current-lang-display {
    color: #ff6b35;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        padding: 60px 40px;
    }
    
    .page-title {
        font-size: 3.2rem;
    }
    
    .reflection-section {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
        gap: 24px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 16px;
        padding: 16px 0;
    }
    
    .brand-title {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 48px 24px;
    }
    
    .page-title {
        font-size: 2.4rem;
    }
    
    .welcome-message {
        font-size: 1.2rem;
    }
    
    .question-card {
        padding: 32px 24px;
    }
    
    .question-title {
        font-size: 1.4rem;
        padding-left: 32px;
    }
    
    .answer-content p {
        font-size: 1.1rem;
    }
    
    .dropdown-toggle {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .dropdown-menu {
        min-width: 140px;
    }
    
    .dropdown-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .intro-section {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 24px 16px;
    }
    
    .page-title {
        font-size: 1.9rem;
    }
    
    .welcome-message {
        font-size: 1rem;
    }
    
    .question-card {
        padding: 24px 20px;
    }
    
    .question-title {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .answer-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .dropdown-toggle {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 100px;
    }
    
    .dropdown-menu {
        min-width: 120px;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .intro-section {
        margin-bottom: 32px;
    }
    
    .reflection-section {
        margin-bottom: 32px;
    }
}

/* Animation for language switching */
.fade-transition {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.fade-transition.show {
    opacity: 1;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Scroll animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-card {
    animation: slideInLeft 0.5s ease-out;
}

.question-card:nth-child(2) {
    animation-delay: 0.1s;
}

.question-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Focus styles for accessibility */
.dropdown-toggle:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

.dropdown-toggle:focus:not(:focus-visible) {
    outline: none;
}

.dropdown-item:focus {
    outline: 2px solid #ff6b35;
    outline-offset: -2px;
}

.dropdown-item:focus:not(:focus-visible) {
    outline: none;
}

/* Print styles */
@media print {
    body {
        background: white !important;
    }
    
    body::before {
        display: none;
    }
    
    .language-switcher {
        display: none;
    }
    
    .main-content {
        box-shadow: none !important;
        background: white !important;
        border: 1px solid #ddd;
    }
    
    .question-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    
    .page-title {
        color: #333 !important;
        background: none !important;
        -webkit-text-fill-color: #333 !important;
    }
}
