/**
 * PsikoAnalist Platform Styles
 * Responsive, modern design for clinical personality assessment
 */

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

:root {
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    background: var(--white);
    padding: 10px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Hero Section */
.hero {
    background: var(--white);
    border-radius: 12px;
    padding: 50px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.hero-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.hero-description {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.feature h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-light);
}

/* How It Works */
.how-it-works {
    background: var(--white);
    border-radius: 12px;
    padding: 50px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

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

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.step p {
    color: var(--text-light);
}

/* Start Section */
.start-section {
    background: var(--white);
    border-radius: 12px;
    padding: 50px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

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

.start-form-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.start-form-container > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    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);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

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

/* Messages */
.error-message {
    background: #ffebee;
    color: var(--danger-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--danger-color);
}

.loading-message {
    text-align: center;
    color: var(--primary-color);
    padding: 20px;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-note {
    font-size: 0.9rem;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Assessment Page Styles */
.assessment-container {
    min-height: 100vh;
    background: var(--bg-color);
    padding: 20px;
}

/* Progress Bar */
.progress-container {
    max-width: 900px;
    margin: 0 auto 30px;
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

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

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

/* Assessment Content */
.assessment-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.assessment-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.assessment-instruction {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Visual Pair Container */
.visual-pair-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.visual-option {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.visual-option:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.visual-option img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.select-button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Visual Separator */
.visual-separator {
    text-align: center;
    padding: 10px 0;
}

.heart-icon {
    width: 50px;
    height: 50px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Assessment Navigation */
.assessment-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.assessment-navigation .btn {
    flex: 1;
    max-width: 200px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay p {
    color: var(--white);
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-color);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .assessment-content {
        padding: 20px;
    }
    
    .visual-option img {
        max-height: 200px;
    }
    
    .assessment-navigation {
        flex-direction: column;
    }
    
    .assessment-navigation .btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .feature {
        padding: 20px 15px;
    }
}

/* Print Styles */
@media print {
    body {
        background: var(--white);
    }
    
    .progress-container,
    .assessment-navigation,
    .loading-overlay,
    .modal {
        display: none !important;
    }
}
