/* Custom Styles for Personality Test Website */

/* Font Family */
.font-noto {
    font-family: 'Noto Sans KR', sans-serif;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Utility Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Custom Form Styles */
.form-group input:focus,
.form-group select:focus {
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.form-group input,
.form-group select {
    transition: all 0.3s ease;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #a855f7;
}

/* Custom Radio Button Styles */
input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
}

input[type="radio"]:checked {
    background-color: #7c3aed;
    border-color: #7c3aed;
}

/* Result Cards */
.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.result-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
    color: white;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.result-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.result-content {
    line-height: 1.7;
    color: #374151;
}

.result-content h4 {
    font-weight: 600;
    color: #1f2937;
    margin: 1rem 0 0.5rem 0;
}

.result-content p {
    margin-bottom: 1rem;
}

.result-content ul {
    list-style-type: none;
    padding-left: 0;
}

.result-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Summary Card Special Styling */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.summary-card .result-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.summary-card .result-title,
.summary-card .result-content {
    color: white;
}

.summary-card .result-content h4 {
    color: #f3f4f6;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #3b82f6);
    transition: width 0.8s ease;
}

/* Trait Bars */
.trait-bar {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.trait-label {
    min-width: 120px;
    font-weight: 500;
    color: #374151;
    margin-right: 1rem;
}

.trait-progress {
    flex: 1;
    height: 0.75rem;
    background-color: #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-right: 1rem;
}

.trait-fill {
    height: 100%;
    border-radius: 0.375rem;
    transition: width 0.8s ease;
}

.trait-score {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #1f2937;
}

/* Color schemes for different traits */
.trait-fill.extroversion { background: linear-gradient(90deg, #ef4444, #f97316); }
.trait-fill.sensing { background: linear-gradient(90deg, #10b981, #059669); }
.trait-fill.thinking { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.trait-fill.judging { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.trait-fill.leadership { background: linear-gradient(90deg, #f59e0b, #d97706); }
.trait-fill.creativity { background: linear-gradient(90deg, #ec4899, #be185d); }
.trait-fill.stability { background: linear-gradient(90deg, #06b6d4, #0891b2); }

/* Responsive Design */
@media (max-width: 768px) {
    /* Header responsive */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Result cards responsive */
    .result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .result-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .result-title {
        font-size: 1.25rem;
    }
    
    /* Trait bars responsive */
    .trait-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trait-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .trait-progress {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .trait-score {
        text-align: center;
        font-size: 1.1rem;
    }
    
    /* Form responsive */
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Button responsive */
    button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Grid responsive */
    .grid {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .result-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .result-title {
        font-size: 1.125rem;
    }
    
    .result-subtitle {
        font-size: 0.8rem;
    }
    
    .trait-label {
        font-size: 0.875rem;
    }
    
    .trait-score {
        font-size: 1rem;
    }
    
    /* Compact button layout */
    .text-center button {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .ml-4 {
        margin-left: 0;
    }
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #374151;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #374151,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #374151,
            .5em 0 0 #374151;
    }
}

/* Scroll Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #3b82f6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6d28d9, #2563eb);
}