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

.charlie-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #9fd4ff 0%, #aeccff 100%);
    color: #1a3a5c;
    font-size: 13px;
    padding: 10px 16px;
    text-align: center;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
}

.charlie-banner__icon {
    font-size: 16px;
    flex-shrink: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 60px;
}

.container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* View containers */
#welcome-view {
    color: white;
}

#goal-view,
#login-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.header {
    padding: 30px 20px;
    text-align: center;
}

#welcome-view .header {
    background: linear-gradient(135deg, #9fd4ff 0%, #aeccff 100%);
}

#goal-view .header {
    background: linear-gradient(135deg, #42a5f5 0%, #42a5f5 100%);
}

.header h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.app-logo {
    height: 32px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.inline-logo {
    height: 1em;
    width: auto;
    display: inline-block;
    vertical-align: -0.15em;
}

.tagline {
    color: rgba(0, 0, 0, 0.85);
    font-size: 14px;
    margin-top: 6px;
    font-style: italic;
    font-weight: 400;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-top: 8px;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 16px;
    background: #f8f9fa;
}

.logo-display-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 340px;
}

.bottom-section {
    padding: 20px 25px 18px;
    background: white;
}

/* City carousel */
.city-section {
    background: #0d2146;
    border-radius: 14px;
    margin: 0 12px 0;
    padding: 14px 16px;
}

.city-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.city-pill {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    user-select: none;
    font-family: inherit;
    line-height: 1.4;
    display: inline-block;
}

.city-pill.active {
    background: #64b5f6;
    border-color: #64b5f6;
    color: #0d2146;
}

.city-mission-text {
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.city-progress-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.city-progress-meta {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.city-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.city-progress-goal {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    text-align: right;
}

.city-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623 0%, #ffb74d 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.city-progress-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

/* City stat tiles */
.city-stats-row {
    display: flex;
    margin-top: 8px;
}

.city-stat-tile {
    flex: 1;
    background: #43a047;
    padding: 18px 16px;
    text-align: center;
    color: white;
}

.city-stat-tile+.city-stat-tile {
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.city-stat-label {
    font-size: 8px;
    font-weight: 700;
    margin-bottom: 6px;
}

.city-stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.welcome-text {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-get-started {
    background: #42a5f5;
}

.btn-get-started:hover {
    background: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

.btn-login {
    background: #1976d2;
}

.btn-login:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

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

/* Hidden state */
.hidden {
    display: none !important;
}

/* Goal Selection View */
#goal-view {
    position: relative;
}

.back-arrow-container {
    background: white;
    padding: 5px;
    display: flex;
    align-items: center;
}

.back-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.back-arrow:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(-2px);
}

.back-arrow:active {
    transform: translateX(0);
}

.goal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 25px 30px;
}

.goal-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.goal-option {
    min-height: 100px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.goal-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 5px;
}

.goal-option:hover {
    border-color: #42a5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.2);
}

.goal-option.selected {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
    border-color: #1976d2;
    box-shadow: 0 8px 24px rgba(66, 165, 245, 0.4);
}

.goal-main {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.goal-option.selected .goal-main {
    color: white;
}

.goal-sub {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.goal-option.selected .goal-sub {
    color: rgba(255, 255, 255, 0.9);
}

.btn-continue {
    background: #42a5f5;
    margin-top: auto;
}

.btn-continue:hover {
    background: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

/* Progression View */
#progression-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.progression-top {
    background: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-bar {
    width: 100%;
    max-width: 250px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a 0%, #43a047 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 33.33%;
}

.progression-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 25px;
    background: #f8f9fa;
}

.progression-text {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-bottom: 60px;
    margin-top: 80px;
    padding: 0 20px;
    line-height: 1.4;
}

.progression-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    margin-top: auto;
}

.progression-buttons .btn {
    flex: 1;
    max-width: none;
}

.btn-signup {
    background: #42a5f5;
}

.btn-signup:hover {
    background: #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

/* Login View */
#login-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px 25px 40px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
}

.signup-prompt {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.signup-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a3563 0%, #245089 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #9fd4ff 0%, #aeccff 100%);
    color: #1a3a5c;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7ec6ff 0%, #9bbff5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 212, 255, 0.5);
}

/* Teacher Search View */
#teacher-search-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.teacher-search-heading-wrap {
    padding: 8px 20px 0;
    background: #f8f9fa;
}

.teacher-search-heading {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #0b1f3a;
    margin: 0;
}

.teachers-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 20px;
    background: #f8f9fa;
    max-height: calc(700px - 109px);
}

.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.teacher-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.teacher-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
}

.teacher-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.teacher-location {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.teacher-expertise {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.teacher-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.teacher-rating-stars {
    font-size: 15px;
    letter-spacing: 1px;
    color: #f5a623;
}

.teacher-rating-text {
    font-size: 13px;
    font-weight: 600;
    color: #5f6b7a;
    text-transform: lowercase;
}

.teacher-experience {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.teacher-badges {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-insurance {
    background: #fce4ec;
    color: #c2185b;
}

.badge-first-aid {
    background: #fff9c4;
    color: #f57f17;
}

.badge-cpr {
    background: #ffebee;
    color: #c62828;
}

.badge-teach {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-two-swimmers {
    background: #e8f5e9;
    color: #4caf50;
}

/* WWCC badge: blue scheme */
.badge-wwcc {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-wwcc .badge-icon {
    color: currentColor;
}

.badge-icon {
    font-size: 14px;
}

/* Welcome view logo hover – matches .app-title .cs-logo-link in cs-logo.css */
#welcome-view .header h1 .cs-logo-link .cs-logo {
    display: inline-block;
    transition: transform 0.18s ease, text-shadow 0.18s ease, filter 0.18s ease;
    will-change: transform;
}

#welcome-view .header h1 .cs-logo-link:hover .cs-logo,
#welcome-view .header h1 .cs-logo-link:focus-visible .cs-logo {
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
    text-shadow:
        0 3px 0 rgba(0, 0, 0, 0.20),
        0 8px 18px rgba(0, 0, 0, 0.15);
}

#welcome-view .header h1 .cs-logo-link:active .cs-logo {
    transform: translateY(0);
    filter: none;
}

/* Desktop responsiveness */
@media (min-width: 768px) {
    .container {
        max-width: 480px;
    }

    .header h1 {
        font-size: 36px;
    }

    .image-placeholder {
        height: 350px;
    }

    .welcome-text {
        font-size: 26px;
    }

    .btn {
        font-size: 19px;
        padding: 18px;
    }
}

/* Shrink hero logo on mobile */
@media (max-width: 480px) {
    .logo-display-hero .cs-logo--xl {
        font-size: 38px;
    }
}

/* Smaller mobile devices */
@media (max-width: 360px) {
    .header h1 {
        font-size: 28px;
    }

    .welcome-text {
        font-size: 20px;
    }

    .btn {
        font-size: 16px;
        padding: 14px;
    }
}
