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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

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

.desktop-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: #1877f2;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 0;
    color: #666;
    text-decoration: none;
}

.mobile-nav.active {
    display: block;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Content Wrapper with Sidebar */
.content-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 20px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-nav h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu > li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: #f5f5f5;
    color: #1877f2;
}

.sidebar-menu a.active {
    background: #e3f2fd;
    color: #1877f2;
    font-weight: bold;
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-title {
    display: block;
    font-weight: bold;
    color: #333;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.menu-section ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.menu-section ul li {
    margin-bottom: 0.25rem;
}

.menu-section ul a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Welcome Section */
.welcome-section {
    flex: 1;
}

.welcome-content {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-content h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.welcome-intro {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.site-description {
    margin-bottom: 2.5rem;
}

.site-description h3 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.description-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.description-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.description-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.item-content h4 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.item-content p {
    color: #666;
    line-height: 1.6;
}

.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    color: white;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 180px;
}

@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-nav h3 {
        font-size: 1.1rem;
    }
    
    .menu-section {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .welcome-content {
        padding: 1.5rem;
    }
    
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .welcome-intro {
        font-size: 1.1rem;
    }
    
    .site-description h3 {
        font-size: 1.5rem;
    }
    
    .description-item {
        padding: 1rem;
    }
    
    .item-icon {
        font-size: 2rem;
    }
    
    .item-content h4 {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: #666;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Tests Grid */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
}

.test-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.test-card-header {
    padding: 1.5rem;
    color: white;
}

.test-card-header.husband-test {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.test-card-header.parenting-test {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
}

.test-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.test-card-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.test-card-body {
    padding: 1.5rem;
}

.test-card-body p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #1877f2;
    color: white;
}

.btn-primary:hover {
    background-color: #145dbf;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #42b883;
    color: white;
}

.btn-secondary:hover {
    background-color: #359268;
}

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

/* Features Section */
.features {
    max-width: 1000px;
    margin: 0 auto 4rem;
    text-align: center;
}

.features h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
}

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

.feature {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h4 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
}

/* Ad Container */
.ad-container {
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.ad-placeholder {
    background: #f5f5f5;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    background: white;
    margin-top: 4rem;
    padding: 2rem 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer .container {
    text-align: center;
}

footer p {
    color: #666;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: #1877f2;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Test Page Styles */
.test-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.test-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.test-title {
    text-align: center;
    margin-bottom: 2rem;
}

.test-title h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Start Screen */
.start-screen {
    text-align: center;
}

.start-screen h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.start-screen p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Question Screen */
.question-screen {
    animation: slideUp 0.5s ease-out;
}

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

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1877f2;
    border-radius: 1rem;
    transition: width 0.3s ease;
}

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

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-btn {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    font-size: 1rem;
    color: #333;
}

.answer-btn:hover {
    background: #f3f4f6;
    border-color: #1877f2;
    transform: translateX(5px);
}

/* Loading Screen */
.loading-screen {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #1877f2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.loading-text {
    font-size: 1.25rem;
    color: #666;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Screen */
.result-screen {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.result-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.result-score {
    font-size: 3rem;
    font-weight: bold;
    color: #1877f2;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.result-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .result-actions {
        flex-direction: row;
    }
}

/* Explanations Section */
.explanations-title {
    font-size: 1.75rem;
    color: #333;
    margin: 3rem 0 1.5rem;
    text-align: center;
    font-weight: 600;
}

.explanation-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: left;
    animation: slideUp 0.5s ease-out;
}

.explanation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.explanation-number {
    font-weight: bold;
    color: #1877f2;
    font-size: 1.1rem;
}

.explanation-status {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.explanation-status.correct {
    background: #d1fae5;
    color: #065f46;
}

.explanation-status.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.explanation-question {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.75rem;
}

.explanation-answer {
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.explanation-text {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    color: #555;
    line-height: 1.7;
    border-left: 4px solid #1877f2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.content-card h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.content-card h2 {
    font-size: 1.75rem;
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-card ul {
    color: #666;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-card li {
    margin-bottom: 0.5rem;
}

.info-box {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h2 {
    margin-top: 0;
}

.back-home {
    text-align: center;
    margin-top: 2rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .test-content {
        padding: 1.5rem;
    }
    
    .question-text {
        font-size: 1.25rem;
    }
    
    .result-emoji {
        font-size: 4rem;
    }
    
    .result-score {
        font-size: 2.5rem;
    }
    
    .result-title {
        font-size: 1.5rem;
    }
}
