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

:root {
    --primary-color: #0E7490;
    --primary-dark: #155E75;
    --primary-light: #22D3EE;
    --secondary-color: #3F6212;
    --secondary-light: #65A30D;
    --success-color: #06A77D;
    --success-light: #08C99D;
    --background: #0B1F1A;
    --background-light: #123028;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-solid: #102821;
    --text-primary: #FFFFFF;
    --text-secondary: #B6CBC5;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.4);
    --glow: 0 0 24px rgba(34, 211, 238, 0.45);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.5);
}

body {
    font-family: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(101, 163, 13, 0.2), transparent 24%),
        linear-gradient(155deg, #061612 0%, #0B1F1A 42%, #132B23 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* Header */
header {
    background: linear-gradient(120deg, rgba(11, 48, 40, 0.92) 0%, rgba(21, 94, 117, 0.9) 100%);
    padding: 0.85rem 1.1rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(34, 211, 238, 0.25), var(--shadow);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(34, 211, 238, 0.25);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    animation: headerGlow 8s ease-in-out infinite;
}

.top-header {
    border-radius: 0 0 1.25rem 1.25rem;
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    position: relative;
    z-index: 1;
}

.top-header h1 {
    font-family: 'Space Grotesk', 'Bricolage Grotesque', sans-serif;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
}

.brand-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    color: #e0e7ff;
    background: linear-gradient(135deg, #0EA5A4, #65A30D);
    box-shadow: 0 6px 14px rgba(14, 165, 164, 0.45);
    overflow: hidden;
}

.header-status-pill {
    position: relative;
    z-index: 1;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
}

.brand-icon svg {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 1.05rem;
}

@keyframes headerGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20%, -20%); }
}

/* Screens */
.screen {
    display: none;
    padding: 1rem;
}

.screen.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card-bg-solid);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.card.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Buttons */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.primary-btn:hover:not(:disabled)::before {
    left: 100%;
}

.primary-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.primary-btn.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.primary-btn.glow {
    box-shadow: var(--glow);
}

.primary-btn.glow:hover:not(:disabled) {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.75);
}

.btn-icon {
    margin-right: 0.5rem;
}

.route-help-text {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transform: none;
}

.secondary-btn.large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.12);
    transform: scale(1.02);
}

.option-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--glow);
}

.icon-btn {
    padding: 0.5rem;
    font-size: 1.2rem;
    background: var(--background);
    border-radius: 6px;
}

.icon-btn:hover {
    background: var(--border-color);
}

/* OR Divider */
.or-divider {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-secondary);
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 1px;
    background: var(--border-color);
    top: 50%;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--success-light), var(--primary-color));
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
    box-shadow: var(--glow-green);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Pub Cards */
.pub-card {
    position: relative;
}

.pub-card.current {
    border: 3px solid var(--success-color);
    box-shadow: 0 0 30px rgba(6, 167, 125, 0.3);
    animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(6, 167, 125, 0.3); }
    50% { box-shadow: 0 0 40px rgba(6, 167, 125, 0.5); }
}

.pub-card.completed {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.pub-card.completed::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(6, 167, 125, 0.8);
    animation: checkmarkPop 0.5s ease-out;
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.pub-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success-color), var(--success-light));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(6, 167, 125, 0.3);
}

.pub-badge.pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

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

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pub-type-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(129, 140, 248, 0.4);
}

.pub-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.pub-address {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.pub-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pub-card .secondary-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Next Pubs */
.next-pub-card {
    background: var(--background);
    border: 2px solid var(--border-color);
}

.next-pub-card h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.locked-pub {
    filter: blur(3px);
    pointer-events: none;
}

.unlock-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

/* Map */
#map {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg-solid);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
    border: 1px solid var(--border-color);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

.group-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.group-code-display span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 0.25em;
}

.info-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#groupMembersList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.member-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.member-status.checked-in {
    color: var(--success-color);
    font-weight: 600;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.error-msg {
    color: #FF6B6B;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.action-buttons {
    padding: 0 1rem;
}

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pulse-btn {
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
    }
    50% { 
        box-shadow: 0 0 36px rgba(99, 102, 241, 0.75);
        transform: translateY(-2px);
    }
}

/* Welcome Hero */
.welcome-hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1rem;
}

.hero-icon {
    width: 4.2rem;
    height: 4.2rem;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #e0e7ff;
    border-radius: 1.1rem;
    background: linear-gradient(135deg, #0E7490, #22D3EE);
    box-shadow: 0 12px 26px rgba(34, 211, 238, 0.35);
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
    overflow: hidden;
}

.hero-icon svg {
    display: block;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 2.1rem;
}

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

.welcome-hero h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #67E8F9, #BEF264);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Location Status */
.location-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(6, 167, 125, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(6, 167, 125, 0.3);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.location-status.loading {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.location-status.error {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.status-icon {
    font-size: 1.4rem;
    color: #818CF8;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.status-text {
    flex: 1;
}

.status-text span {
    display: block;
}

.location-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Button Row */
.button-row {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.setup-steps-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.setup-step-badge {
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.6rem;
    padding: 0.35rem 0.2rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.setup-step-badge.active {
    color: white;
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}

.setup-step-badge.done {
    color: #dcfce7;
    border-color: rgba(8, 201, 157, 0.65);
}

.setup-step {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0.9rem;
    padding: 0.85rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.setup-step.unlocked {
    border-color: rgba(34, 211, 238, 0.3);
}

.setup-step.locked {
    opacity: 0.52;
    filter: saturate(0.8);
    pointer-events: none;
}

.step-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.step-title-row h3 {
    margin: 0;
    font-size: 1rem;
}

.step-number {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.28);
}

.custom-location-wrapper {
    margin-top: 0.75rem;
}

.custom-location-wrapper label {
    display: block;
    font-size: 0.86rem;
    margin-bottom: 0.35rem;
}

#customLocationInput {
    width: 100%;
    margin-bottom: 0.55rem;
    padding: 0.72rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

#customLocationInput:focus {
    outline: none;
    border-color: var(--primary-light);
}

#startRunBtn {
    margin-top: 0.4rem;
}

@media (min-width: 480px) {
    .button-row {
        flex-direction: row;
    }
    
    .button-row .primary-btn,
    .button-row .secondary-btn {
        width: auto;
        flex: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .top-header {
        padding: 0.75rem 0.9rem;
    }

    .top-header h1 {
        font-size: 1.1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .option-btn {
        width: 100%;
    }
    
    .route-mode-cards {
        flex-direction: column;
    }
    
}

/* ===== STEP-DOT HEADER ===== */
.step-dots-header {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.sdot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.28);
    transition: all 0.35s ease;
}

.sdot.sdot-active {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
    transform: scale(1.3);
}

.sdot.sdot-done {
    background: var(--success-color);
    border-color: var(--success-color);
}

/* ===== SETUP CARD ===== */
.setup-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
}

.step-hidden {
    display: none !important;
}

/* ===== LEVEL COMPLETE OVERLAY ===== */
.lc-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(6, 167, 125, 0.97), rgba(8, 201, 157, 0.97));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.22s ease;
    backdrop-filter: blur(6px);
}

.lc-overlay.lc-visible {
    opacity: 1;
}

.lc-check {
    font-size: 3.8rem;
    line-height: 1;
    color: white;
    animation: lcCheckPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes lcCheckPop {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}

.lc-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-top: 0.55rem;
    opacity: 0;
    animation: lcTextSlide 0.3s 0.22s ease both;
}

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

/* ===== STEP CONTENT ===== */
.step-tag {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 0.45rem;
}

.step-question {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stops group - buttons with subtitle */
.stops-group .option-btn {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.9rem 0.5rem;
}

.stops-group .option-btn small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.65;
    display: block;
}

/* ===== ROUTE MODE CARDS ===== */
.route-mode-cards {
    display: flex;
    gap: 0.75rem;
}

.route-card-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.2rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.route-card-btn:hover {
    border-color: var(--primary-light);
    background: rgba(34, 211, 238, 0.09);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.route-card-btn.active {
    border-color: var(--primary-light);
    background: rgba(34, 211, 238, 0.14);
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.28);
}

.rmc-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.route-card-btn strong {
    font-size: 1rem;
    font-weight: 700;
    display: block;
}

.route-card-btn small {
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== SETUP SUMMARY ===== */
.setup-summary {
    text-align: center;
    padding-top: 0.25rem;
}

.summary-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.chip {
    display: inline-block;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.32);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: chipPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.chip:nth-child(1) { animation-delay: 0.0s; }
.chip:nth-child(2) { animation-delay: 0.07s; }
.chip:nth-child(3) { animation-delay: 0.14s; }
.chip:nth-child(4) { animation-delay: 0.21s; }

@keyframes chipPop {
    from { opacity: 0; transform: scale(0.7) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Setup Overrides ===== */
.app-container {
    padding-top: 0.8rem;
}

.setup-step-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.step-nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-radius: 0.7rem;
    padding: 0.48rem 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.setup-step[data-step="2"] {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(34, 211, 238, 0.04) 100%);
}

.setup-step[data-step="2"] .step-question {
    margin-bottom: 1.05rem;
}

.choice-panel {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(11, 31, 26, 0.55);
    border-radius: 14px;
    padding: 0.85rem;
    margin-bottom: 0.8rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.choice-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.choice-icon {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.38);
    font-size: 0.95rem;
}

.choice-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #ecfeff;
}

.price-group .option-btn,
.stops-group .option-btn {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.option-emoji {
    font-size: 1rem;
    line-height: 1;
}

.setup-next-btn {
    margin-top: 0.3rem;
}

.price-group .option-btn small,
.stops-group .option-btn small {
    font-size: 0.72rem;
    opacity: 0.72;
    font-weight: 500;
    line-height: 1.2;
}

.step-nav-btn.is-active {
    color: #ecfeff;
    border-color: rgba(34, 211, 238, 0.9);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
}

.step-nav-btn.is-done {
    color: #dcfce7;
    border-color: rgba(6, 167, 125, 0.75);
    background: rgba(6, 167, 125, 0.12);
}

.step-nav-btn.is-locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.danger-btn {
    width: 100%;
    background: linear-gradient(135deg, #6f1d1b 0%, #7f1d1d 100%);
    border: 1px solid rgba(254, 202, 202, 0.28);
    color: #fff;
}

.danger-btn:hover {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border-color: rgba(254, 202, 202, 0.4);
    color: #fff;
}

@media (max-width: 480px) {
    .setup-step-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .step-nav-btn {
        font-size: 0.7rem;
        padding: 0.42rem 0.2rem;
    }

    .choice-panel {
        padding: 0.7rem;
    }
}
