/* Custom Styles for ChronoBirth Magic */

/* Step Indicators */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.step-indicator .step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background: #e2e8f0;
    color: #64748b;
    transition: all 0.3s ease;
}

.step-indicator .step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.step-indicator.active .step-label {
    color: #ef4444;
}

.step-indicator.completed .step-number {
    background: #10b981;
    color: white;
}

.step-line {
    width: 3rem;
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.step-indicator.active + .step-line,
.step-indicator.completed + .step-line {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-step.prev {
    transform: translateX(-20px);
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.dark .input-label {
    color: #94a3b8;
}

.input-wrapper {
    position: relative;
}

.birth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.dark .birth-input {
    color: #f1f5f9;
    background: #1e293b;
    border-color: #334155;
}

.birth-input:hover {
    border-color: #cbd5e1;
}

.birth-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.dark .birth-input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.input-glow {
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.birth-input:focus ~ .input-glow {
    opacity: 0.3;
}

/* Preset Buttons */
.preset-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark .preset-btn {
    color: #94a3b8;
    background: #334155;
    border-color: #475569;
}

.preset-btn:hover {
    color: #ef4444;
    background: #fef2f2;
    border-color: #ef4444;
    transform: translateY(-2px);
}

.dark .preset-btn:hover {
    background: #451a1a;
}

/* Navigation Buttons */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.nav-btn.primary {
    color: white;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.nav-btn.secondary {
    color: #64748b;
    background: #f1f5f9;
}

.dark .nav-btn.secondary {
    color: #94a3b8;
    background: #334155;
}

.nav-btn.secondary:hover {
    background: #e2e8f0;
}

.dark .nav-btn.secondary:hover {
    background: #475569;
}

.nav-btn.magic {
    color: white;
    background: linear-gradient(135deg, #ef4444, #f59e0b, #8b5cf6);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-btn.magic:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.magic-text {
    position: relative;
}

.magic-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-btn.magic:hover .magic-text::after {
    transform: scaleX(1);
}

/* Fact Cards */
.fact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.dark .fact-card {
    background: #334155;
    border-color: #475569;
}

.fact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.fact-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fact-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.dark .fact-value {
    color: #f1f5f9;
}

/* Result Cards */
.result-card {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.dark .result-card {
    background: #334155;
    border-color: #475569;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.result-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.result-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.dark .result-value {
    color: #f1f5f9;
}

.result-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

.dark .result-subtitle {
    color: #94a3b8;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark .action-btn {
    color: #94a3b8;
    background: #334155;
    border-color: #475569;
}

.action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.dark .action-btn:hover {
    background: #475569;
}

.action-btn.primary {
    color: white;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    border-color: transparent;
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection Color */
::selection {
    background: rgba(239, 68, 68, 0.3);
    color: inherit;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* Number Input Spinner Hide */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
}

/* Animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Responsive */
@media (max-width: 640px) {
    .step-line {
        width: 1.5rem;
    }
    
    .step-indicator .step-label {
        display: none;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-value {
        font-size: 1.25rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}