/* =============================================
   VARIABLES
   ============================================= */
:root {
    --navy:       #001040;
    --royal:      #003087;
    --ocean:      #0055B3;
    --sky:        #0088CC;
    --pale:       #EEF5FF;
    --gold:       #FFB81C;
    --white:      #FFFFFF;
    --text:       #0D1F3C;
    --text-mid:   #4A6080;
    --text-light: #7A90A8;

    --shadow-sm: 0 4px 14px rgba(0, 48, 135, 0.14);
    --shadow-md: 0 8px 30px rgba(0, 48, 135, 0.18);
    --shadow-lg: 0 20px 60px rgba(0, 48, 135, 0.26);

    --radius:    24px;
    --radius-sm: 14px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--navy) 0%, var(--royal) 35%, var(--ocean) 65%, var(--sky) 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* =============================================
   BACKGROUND OVERLAY
   ============================================= */
.bg-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(0, 136, 204, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(255, 184, 28, 0.08) 0%, transparent 50%);
}

/* =============================================
   APP LAYOUT
   ============================================= */
.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 72px;
}

/* =============================================
   HEADER
   ============================================= */
.app-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    animation: fadeDown 0.5s var(--ease) both;
}

.header-logo {
    font-size: 2.1rem;
    filter: drop-shadow(0 2px 10px rgba(255, 184, 28, 0.5));
}

.header-text h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.header-text p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 3px;
}

/* =============================================
   SCREENS
   ============================================= */
.screen {
    display: none;
    width: 100%;
    max-width: 640px;
    animation: fadeUp 0.45s var(--ease) both;
}

.screen.active { display: block; }

/* =============================================
   BASE CARD
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* =============================================
   WELCOME CARD
   ============================================= */
.welcome-card {
    padding: 52px 44px;
    text-align: center;
}

.welcome-icon {
    font-size: 4.2rem;
    display: block;
    margin-bottom: 22px;
    animation: float 3.5s ease-in-out infinite;
}

.welcome-card h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--royal);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.welcome-card > p {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-features {
    list-style: none;
    text-align: left;
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 38px;
}

.welcome-features li {
    font-size: 0.95rem;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--royal), var(--sky));
    flex-shrink: 0;
}

.welcome-card .btn-primary {
    width: 100%;
}

/* =============================================
   QUIZ CARD
   ============================================= */
.quiz-card { padding: 0; }

/* Progress */
.progress-section {
    padding: 24px 32px 20px;
    background: var(--pale);
    border-bottom: 1px solid rgba(0, 80, 180, 0.08);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-info span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-mid);
}

#q-percent { color: var(--royal); }

.progress-track {
    height: 7px;
    background: rgba(0, 80, 180, 0.12);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--royal), var(--gold));
    border-radius: 99px;
    transition: width 0.45s var(--ease);
}

.progress-steps {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.step {
    width: 32px;
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 80, 180, 0.14);
    transition: background 0.3s var(--ease);
}

.step.active    { background: linear-gradient(90deg, var(--royal), var(--sky)); }
.step.completed { background: var(--gold); }

/* Question Area */
.question-area {
    padding: 32px 32px 24px;
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.question-icon {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.question-text {
    font-size: 1.42rem;
    font-weight: 700;
    color: var(--royal);
    letter-spacing: -0.02em;
    line-height: 1.25;
    padding-top: 4px;
}

/* Options Grid */
.options-container {
    display: grid;
    gap: 12px;
}

.options-container.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.options-container.cols-2 { grid-template-columns: 1fr 1fr; }
.options-container.cols-1 { grid-template-columns: 1fr; }

.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--white);
    border: 2px solid rgba(0, 80, 180, 0.13);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
                transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    position: relative;
    font-family: inherit;
}

.option-btn:hover {
    border-color: var(--ocean);
    background: rgba(0, 85, 179, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.option-btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.option-btn.selected {
    border-color: var(--royal);
    background: linear-gradient(135deg, rgba(0, 48, 135, 0.055), rgba(0, 136, 204, 0.055));
    box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

.option-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    background: var(--royal);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 22px;
    text-align: center;
}

.opt-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.opt-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.opt-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.opt-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
}

.option-btn.selected .opt-label { color: var(--royal); }

/* Quiz Nav */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px 28px;
    border-top: 1px solid rgba(0, 80, 180, 0.08);
}

/* =============================================
   LOADING CARD
   ============================================= */
.loading-card {
    padding: 60px 44px;
    text-align: center;
}

.loading-ship {
    font-size: 4rem;
    display: block;
    margin-bottom: 24px;
    animation: sail 2.2s ease-in-out infinite;
}

.loading-card h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--royal);
    margin-bottom: 10px;
}

.loading-card p {
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 32px;
    min-height: 1.6em;
    transition: opacity 0.3s ease;
}

.loading-dots {
    display: flex;
    gap: 9px;
    justify-content: center;
}

.loading-dots span {
    width: 11px;
    height: 11px;
    background: var(--ocean);
    border-radius: 50%;
    animation: pulseDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.22s; }
.loading-dots span:nth-child(3) { animation-delay: 0.44s; }

/* =============================================
   RESULTS
   ============================================= */
.results-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

/* Results Header */
.results-header-card {
    background: linear-gradient(145deg, var(--navy) 0%, var(--royal) 45%, var(--ocean) 100%);
    border-radius: var(--radius);
    padding: 0;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.4s var(--ease) both;
}

.results-header-card::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.results-header-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: rgba(255, 184, 28, 0.07);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Ship Image Banner */
.ship-image-wrapper {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy) 0%, #003f7f 50%, var(--ocean) 100%);
    flex-shrink: 0;
}

.ship-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(to bottom, transparent, var(--royal));
    pointer-events: none;
    z-index: 3;
}

.ship-image-skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.13) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.7s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.ship-image-skeleton.hidden {
    opacity: 0;
    pointer-events: none;
}

.ship-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.65s ease;
    z-index: 2;
}

.ship-image.loaded {
    opacity: 1;
}

.results-header-content {
    padding: 26px 36px 36px;
    position: relative;
    z-index: 1;
}

.match-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 99px;
    padding: 6px 18px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.ship-name {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.ship-class-tag {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    border-radius: 99px;
    padding: 5px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.ship-cruise-line {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.ship-tagline {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.88;
    line-height: 1.45;
    position: relative;
    z-index: 1;
}

/* Result Sections */
.result-section {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 22px 24px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.4s var(--ease) both;
}

.result-section:nth-child(2) { animation-delay: 0.08s; }
.result-section:nth-child(3) { animation-delay: 0.16s; }
.result-section:nth-child(4) { animation-delay: 0.24s; }
.result-section:nth-child(5) { animation-delay: 0.32s; }
.result-section:nth-child(6) { animation-delay: 0.40s; }

.result-tip {
    background: linear-gradient(135deg, rgba(255, 184, 28, 0.09), rgba(255, 184, 28, 0.04));
    border: 1px solid rgba(255, 184, 28, 0.32);
}

.section-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.section-content h3 {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-content p {
    font-size: 0.96rem;
    color: var(--text);
    line-height: 1.65;
}

.activities-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.activities-list li {
    font-size: 0.96rem;
    color: var(--text);
    line-height: 1.5;
    padding-left: 22px;
    position: relative;
}

.activities-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ocean);
    font-weight: 700;
}

/* Itineraries List */
.itineraries-list {
    display: flex;
    flex-direction: column;
}

.itinerary-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 80, 180, 0.09);
}

.itinerary-item:first-child { padding-top: 0; }

.itinerary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.itinerary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.itinerary-duration {
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--white);
    background: var(--ocean);
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
}

.itinerary-name {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

.itinerary-ports {
    font-size: 0.82rem;
    color: var(--text-mid);
    line-height: 1.45;
}

/* Booking Section */
.booking-section {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 22px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.4s var(--ease) both;
    animation-delay: 0.38s;
}

.btn-book {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #FFB81C, #E8A200);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1.04rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 184, 28, 0.42);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    line-height: 1.35;
    text-align: center;
}

.btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(255, 184, 28, 0.58);
}

.btn-book:active {
    transform: translateY(0);
}

.affiliate-disclaimer {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 10px;
    line-height: 1.4;
}

#btn-restart {
    align-self: center;
    min-width: 200px;
    margin-top: 4px;
    animation: fadeUp 0.4s var(--ease) both;
    animation-delay: 0.46s;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background 0.2s var(--ease), border-color 0.2s var(--ease);
    border: 2px solid transparent;
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal), var(--ocean));
    color: var(--white);
    box-shadow: 0 4px 18px rgba(0, 48, 135, 0.38);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(0, 48, 135, 0.44);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

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

.btn-ghost {
    background: transparent;
    color: var(--text-mid);
    border-color: rgba(0, 80, 180, 0.18);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(0, 80, 180, 0.06);
    border-color: rgba(0, 80, 180, 0.3);
    color: var(--royal);
}

.btn-outline {
    background: transparent;
    color: var(--royal);
    border-color: var(--royal);
}

.btn-outline:hover {
    background: var(--royal);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 48, 135, 0.35);
}

.btn-lg {
    padding: 16px 34px;
    font-size: 1.06rem;
    border-radius: 14px;
}

.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateX(5px); }

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* =============================================
   FOOTER
   ============================================= */
.app-footer {
    width: 100%;
    margin-top: auto;
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.42);
}

.app-footer a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover { color: var(--white); }

.footer-sep { opacity: 0.5; }

/* =============================================
   SCREEN MODIFIER — WIDE
   ============================================= */
.screen--wide { max-width: 760px; }

/* =============================================
   PRIVACY PAGE
   ============================================= */
.privacy-card {
    padding: 0;
    overflow: hidden;
}

.privacy-nav {
    padding: 20px 28px 0;
}

.privacy-body {
    padding: 20px 36px 44px;
}

.privacy-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--royal);
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.privacy-date {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.privacy-intro {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.65;
    padding: 16px 20px;
    background: var(--pale);
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
    border-left: 3px solid var(--ocean);
}

.privacy-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(0, 80, 180, 0.08);
}

.privacy-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.privacy-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--royal);
    margin-bottom: 10px;
}

.privacy-section p {
    font-size: 0.93rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 10px;
}

.privacy-section p:last-child { margin-bottom: 0; }

.privacy-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.privacy-section ul li {
    font-size: 0.93rem;
    color: var(--text-mid);
    line-height: 1.65;
    padding-left: 18px;
    position: relative;
}

.privacy-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ocean);
    font-weight: 700;
}

.privacy-section a {
    color: var(--ocean);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 85, 179, 0.3);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.privacy-section a:hover {
    color: var(--royal);
    border-bottom-color: var(--royal);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-11px); }
}

@keyframes sail {
    0%, 100% { transform: translateX(-9px) rotate(-4deg); }
    50%       { transform: translateX(9px) rotate(4deg); }
}

@keyframes pulseDot {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
    40%           { transform: scale(1.1);  opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position:  200% center; }
    100% { background-position: -200% center; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 540px) {
    .app { padding: 18px 12px 56px; }

    .app-header { margin-bottom: 18px; }
    .header-text h1 { font-size: 1.35rem; }

    .welcome-card { padding: 40px 24px; }
    .welcome-card h2 { font-size: 1.75rem; }

    .progress-section { padding: 20px 20px 16px; }
    .question-area { padding: 24px 20px 20px; }
    .question-text { font-size: 1.2rem; }
    .quiz-nav { padding: 16px 20px 24px; }

    .options-container.cols-3 { grid-template-columns: 1fr 1fr; }
    .options-container.cols-2 { grid-template-columns: 1fr; }

    .ship-image-wrapper { height: 180px; }
    .results-header-content { padding: 20px 22px 28px; }
    .ship-name { font-size: 1.9rem; }

    .result-section { padding: 18px 18px; }

    .privacy-body { padding: 16px 20px 36px; }
    .privacy-title { font-size: 1.65rem; }
}
