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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-brand i {
    margin-right: 8px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #555;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #f0f0f0;
    color: #667eea;
}

.btn-register {
    background: #667eea;
    color: white !important;
}

.btn-register:hover {
    background: #5568d3;
}

/* Flash Messages */
.flash-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
}

.close-btn:hover {
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: white;
    padding: 4rem 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 3rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Info Section */
.info-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.info-section h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
}

.info-section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

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

.dimension-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.dimension-card:hover {
    transform: translateY(-5px);
}

.dimension-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.dimension-card i {
    margin-right: 8px;
}

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 20px;
    min-height: calc(100vh - 200px);
}

.auth-form-container {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 450px;
    width: 100%;
}

.auth-form-container h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group label i {
    margin-right: 5px;
    color: #667eea;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #667eea;
    font-weight: 500;
}

/* Assessment Page */
.assessment-container {
    background: white;
    margin: 2rem auto;
    padding: 3rem;
    border-radius: 16px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.assessment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.assessment-header h1 {
    color: #667eea;
    margin-bottom: 2rem;
}

.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    background: #e0e0e0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 1.1rem;
    color: #666;
}

.question-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.question-number {
    color: #667eea;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #333;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-label:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.option-label input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-label input[type="radio"]:checked + .option-text {
    color: #667eea;
    font-weight: 500;
}

.option-text {
    flex: 1;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Dashboard */
.dashboard-container {
    background: white;
    margin: 2rem auto;
    padding: 3rem;
    border-radius: 16px;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #777;
    margin-bottom: 1.5rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results i {
    font-size: 5rem;
    color: #bdc3c7;
    margin-bottom: 2rem;
}

.no-results h2 {
    color: #555;
    margin-bottom: 1rem;
}

.no-results p {
    color: #777;
    margin-bottom: 2rem;
}

.results-container h2 {
    color: #667eea;
    margin-bottom: 2rem;
}

.result-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

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

.result-header h3 {
    color: #667eea;
    margin: 0;
}

.mbti-type {
    background: #667eea;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.result-summary {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.result-details {
    display: grid;
    gap: 1.5rem;
}

.detail-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.detail-section h4 {
    color: #667eea;
    margin-bottom: 1rem;
}

.detail-section h4 i {
    margin-right: 8px;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.tag-strength {
    background: #d4edda;
    color: #155724;
}

.tag-weakness {
    background: #fff3cd;
    color: #856404;
}

.tag-career {
    background: #d1ecf1;
    color: #0c5460;
}

.tips-list {
    list-style: disc;
    padding-left: 2rem;
}

.tips-list li {
    margin-bottom: 0.5rem;
}

.result-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    color: #777;
}

/* Result Page */
.result-page-container {
    background: white;
    margin: 2rem auto;
    padding: 3rem;
    border-radius: 16px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.result-page-header h1 {
    color: #667eea;
    margin-bottom: 1rem;
}

.mbti-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
}

.result-date {
    color: #777;
    margin-top: 0.5rem;
}

.result-full {
    display: grid;
    gap: 2rem;
}

.section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.section h3 i {
    margin-right: 8px;
}

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

.score-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.dimension-label {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .assessment-container,
    .dashboard-container,
    .result-page-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
