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

:root {
    --primary-color: #1e4b8e;
    --primary-dark: #153a70;
    --primary-light: #2a5fa8;
    --dominance-color: #e74c3c;
    --influence-color: #f39c12;
    --steadiness-color: #27ae60;
    --conscientiousness-color: #3498db;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #e1e5eb;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(30, 75, 142, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(30, 75, 142, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 16px;
    color: var(--white);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

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

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(30, 75, 142, 0.1);
}

.btn-danger {
    background: #e74c3c;
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 auto 1rem;
}

.feature-icon.dominance { background: var(--dominance-color); }
.feature-icon.influence { background: var(--influence-color); }
.feature-icon.steadiness { background: var(--steadiness-color); }
.feature-icon.conscientiousness { background: var(--conscientiousness-color); }

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Form Styles */
.form-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Questions Section */
.questions-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.hidden {
    display: none !important;
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.question-container {
    padding: 2rem 0;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-label:hover {
    background: rgba(30, 75, 142, 0.05);
    border-color: var(--primary-light);
}

.option-label input {
    display: none;
}

.option-label input:checked + .option-text {
    color: var(--primary-color);
    font-weight: 500;
}

.option-label:has(input:checked) {
    background: rgba(30, 75, 142, 0.1);
    border-color: var(--primary-color);
}

.option-text {
    flex: 1;
}

.option-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.option-label:has(input:checked) .option-indicator {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.option-label:has(input:checked) .option-indicator::after {
    content: '✓';
    color: var(--white);
    font-size: 0.8rem;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Results Page */
.results-container {
    max-width: 900px;
    margin: 0 auto;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.no-results h2 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.results-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.chart-section {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    color: var(--white);
}

.score-card.dominance { background: var(--dominance-color); }
.score-card.influence { background: var(--influence-color); }
.score-card.steadiness { background: var(--steadiness-color); }
.score-card.conscientiousness { background: var(--conscientiousness-color); }

.score-letter {
    font-size: 2rem;
    font-weight: 700;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.score-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.profile-section {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.profile-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.profile-description {
    color: var(--text-color);
    line-height: 1.8;
}

.characteristics-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.char-column h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.char-column ul {
    list-style: none;
}

.char-column li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.char-column li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.recommendations-section {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.recommendations-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.actions-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Admin Page */
.admin-container {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-container h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.admin-table-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.admin-table-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
}

.admin-table tr:hover {
    background: rgba(30, 75, 142, 0.02);
}

.admin-table .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

/* Footer */
.footer {
    background: var(--white);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .characteristics-section {
        grid-template-columns: 1fr;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-section {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .actions-section, .nav {
        display: none;
    }

    .results-content {
        box-shadow: none;
    }

    .page {
        display: block !important;
    }

    #page-home, #page-assessment, #page-admin {
        display: none !important;
    }
}
