/* Investment DNA Quiz - Custom Styles */

/* Import Inter font for crisp typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Base styles and reset */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Prevent text selection on interactive elements */
button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Button base styles with brutal shadows */
button {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px) translateX(1px);
}

/* Option buttons styling */
.option-button {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.option-button:hover {
    background: #fbbf24;
    border-color: #000000;
    box-shadow: 2px 2px 0px 0px #000000;
}

.option-button:active {
    transform: translateX(1px) translateY(1px);
    box-shadow: 1px 1px 0px 0px #000000;
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast notification */
.toast {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translate(-50%, -100px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Card hover effects */
.card {
    transition: all 0.2s ease;
}

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

/* Result traits animation */
.trait-bar {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Personality type card special styling */
.personality-card {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    position: relative;
    overflow: hidden;
}

.personality-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #fbbf24);
    z-index: -1;
    border-radius: inherit;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    /* Larger touch targets */
    button {
        min-height: 44px;
    }
    
    /* Reduce motion on mobile for better performance */
    button:hover {
        transform: none;
    }
    
    button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Optimize spacing for smaller screens */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    button:hover {
        transform: none;
    }
    
    .option-button:hover {
        background: #f9fafb;
        border-color: #e5e7eb;
        box-shadow: none;
    }
    
    /* Enhanced touch feedback */
    button:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button {
        border-width: 3px !important;
    }
    
    .trait-bar {
        border: 1px solid #000000;
    }
}

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

/* Focus styles for accessibility */
button:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #000000;
    border-top: 2px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Icon styling */
.fas, .far, .fab {
    font-size: inherit;
    vertical-align: baseline;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection colors */
::selection {
    background-color: #fbbf24;
    color: #000000;
}

/* Print styles */
@media print {
    button {
        box-shadow: none !important;
        border: 2px solid #000000 !important;
    }
    
    .bg-sunshine {
        background: #fbbf24 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    /* Hide interactive elements in print */
    button {
        display: none;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Keep light theme for this specific app */
    body {
        background: white;
        color: black;
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Ensure icons load properly */
@font-face {
    font-display: swap;
}

/* Score Circle Styling */
.score-circle, .border-3 {
    border-width: 3px !important;
}

/* Utility classes for animations */
.slide-in {
    animation: slideIn 0.5s ease-out;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

.pulse-once {
    animation: pulseOnce 0.6s ease-out;
}

@keyframes slideIn {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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