/* Vroom on the Go - Custom Styles */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --transition-duration: 300ms;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    scroll-behavior: smooth;
}

/* Sections */
section {
    width: 100%;
    transition: opacity var(--transition-duration) ease-in-out;
}

.hidden {
    display: none !important;
}

/* Splash Screen */
.splash-screen {
    background: linear-gradient(135deg, #4338ca 0%, #7c2d9e 100%);
    animation: splashFadeIn 0.6s ease-in-out;
}

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

/* Splash Screen Typography */
.vroom-title {
    font-size: 6rem;
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.on-the-text {
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* GO Button */
.go-button {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #4338ca;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    border: none;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 8px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 3rem;
}

.go-button:hover {
    transform: scale(1.05);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 0 12px rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
}

.go-button:active {
    transform: scale(0.98);
}

/* Questions Screen */
.questions-screen {
    background: linear-gradient(135deg, #4338ca 0%, #7c2d9e 100%);
}

/* Header Banner Container */
.header-banner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    padding: 1rem 1.5rem;
    width: 100%;
}

/* Mobile header container - reduced padding */
@media (max-width: 768px) {
    .header-banner-container {
        padding: 0.5rem 1rem;
    }
}

/* Back Button */
.back-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

/* Header Spacer (to balance the layout) */
.header-spacer {
    width: 60px;
}

/* Header Banner */
.header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.header-banner:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-vroom {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header-onthego {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.questions-screen .card {
    border: 2px solid rgba(255, 255, 255, 1);
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, transparent 70%), rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition:
        transform var(--transition-duration) ease,
        box-shadow var(--transition-duration) ease;
    border-radius: 1.5rem;
}

/* Question Transition Animation */
.question-transition-out {
    animation: slideOut 0.3s ease-out forwards;
}

.question-transition-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.questions-screen .card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

#questionText {
    color: #ffffff;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.question-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
}

/* Answer Buttons */
#answersContainer {
    gap: 1rem;
}

#answersContainer .btn {
    text-transform: none;
    font-weight: 600;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all var(--transition-duration) ease;
    border: 2px solid transparent;
}

#answersContainer .btn-outline {
    color: #ffffff;
    border: none;
    background: #7f2189b9;
    color: #ffffff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Desktop hover only */
@media (hover: hover) and (pointer: fine) {
    #answersContainer .btn-outline:hover {
        background: #d22ee4b9;
        color: #ffffff;
        transform: translateX(4px);
        border: 1px solid rgba(255, 255, 255, 0.8);
    }
}

/* Remove active state styling for better mobile experience */
#answersContainer .btn-outline:active {
    background: #7f2189b9;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Selected Answer Button */
#answersContainer .btn-primary {
    background: #e500fe;
    color: #ffffff;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

#answersContainer .btn-primary:hover {
    background: linear-gradient(135deg, #e040f0 0%, #b028d6 100%);
    transform: translateX(4px);
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.progress-primary::-webkit-progress-bar {
    background-color: rgba(255, 255, 255, 0.15);
}

.progress-primary::-webkit-progress-value {
    background-color: rgba(255, 255, 255, 1);
}

.progress-primary::-moz-progress-bar {
    background-color: rgba(255, 255, 255, 1);
}

.progress-primary {
    background-color: rgba(255, 255, 255, 0.35);
}

.progress-primary[value]::-webkit-progress-value {
    background-color: rgba(255, 255, 255, 1) !important;
}

/* Progress Bar Text */
.questions-screen .text-gray-700,
.questions-screen .text-gray-500 {
    color: #ffffff !important;
    font-weight: 600;
}

/* Results Screen */
.results-screen {
    background: linear-gradient(135deg, #4338ca 0%, #7c2d9e 100%);
}

.results-screen .card {
    border: 2px solid rgba(255, 255, 255, 1);
    background: #3701415d;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-radius: 1.5rem;
}

.results-screen .card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.result-intro-text {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
    opacity: 0.9;
}

.result-title {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-subtitle {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
}

.result-recommendation-box {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
}

.result-recommendation {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    line-height: 1.6;
    font-style: italic;
}

.result-summary-box {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
}

/* Answers Summary */
#answersSummary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.answer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    border-left: 3px solid rgba(255, 255, 255, 0.8);
}

.answer-item .question-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
}

.answer-item .answer-value {
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    transition: all var(--transition-duration) ease;
    text-transform: none;
    font-weight: 600;
}

.btn-primary {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    background-color: #3730a3;
    border-color: #3730a3;
}

/* Previous button in questions screen */
.questions-screen .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.questions-screen .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

/* Default button outline (for results page) */
.btn-outline {
    border-color: #d1d5db;
    color: #4f46e5;
    background-color: white;
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #4f46e5;
}

.btn-ghost {
    color: #4f46e5;
    text-decoration: underline;
}

.btn-ghost:hover {
    background-color: #f3f4f6;
}

#restartBtn {
    margin: 1rem 0;
    background-color: #7c028a;
    border: 2px solid #ab59b4;
}
#restartBtn:hover {
    background-color: #a020d0;
    border-color: #d18fff;
    box-shadow: none;
}

/* Divider */
.divider {
    margin: 1.5rem 0;
    border-color: #e5e7eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    section {
        min-height: auto;
    }

    /* Splash Screen Mobile */
    .vroom-title {
        font-size: 4rem;
    }

    .on-the-text {
        font-size: 1.5rem;
    }

    .go-button {
        width: 140px;
        height: 140px;
        font-size: 2rem;
    }

    #questionText {
        font-size: 1.25rem;
    }

    .question-description {
        font-size: 1rem;
    }

    #answersContainer {
        gap: 0.75rem;
    }

    #answersContainer .btn {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Ensure buttons are full width on mobile */
    #answersContainer .btn {
        width: 100%;
    }

    /* Better spacing on mobile - reduced padding */
    .questions-screen,
    .results-screen {
        padding: 0.25rem;
    }

    /* Reduce horizontal padding */
    .questions-screen .p-4,
    .results-screen .p-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Override pt-8 to reduce top padding on mobile */
    .questions-screen .pt-8,
    .results-screen .pt-8 {
        padding-top: 0.5rem !important;
    }

    /* Reduce border radius on mobile */
    .questions-screen .card,
    .results-screen .card {
        border-radius: 1rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    #answersContainer .btn {
        border-radius: 0.5rem !important;
    }

    /* Mobile header - single line, smaller text */
    .header-banner {
        flex-direction: row;
        gap: 0.35rem;
    }

    .header-vroom {
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: -0.02em;
    }

    .header-onthego {
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        opacity: 1;
    }

    /* Align content to top instead of center on mobile */
    .questions-screen > .flex-1,
    .results-screen > .flex-1 {
        align-items: flex-start !important;
    }
}

/* Tablet and Desktop */
@media (min-width: 769px) {
    .vroom-title {
        font-size: 7rem;
    }

    .on-the-text {
        font-size: 2.5rem;
    }

    .go-button {
        width: 180px;
        height: 180px;
        font-size: 3rem;
    }

    #questionText {
        font-size: 2rem;
    }

    .card-body {
        padding: 3rem;
    }
}

/* Dark Mode Support (future) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .card {
        background-color: #374151;
        color: #f3f4f6;
    }

    #questionText {
        color: #f9fafb;
    }

    .alert {
        background-color: #1e293b;
        color: #93c5fd;
        border-left-color: #3b82f6;
    }
}

/* Accessibility */
.btn:focus,
button:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

[data-aos] {
    animation: slideIn 0.6s ease-out;
}
