/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif;
    background: white;
    overflow-x: hidden;
    color: #0a2f6c;
}

/* VIDEO BACKGROUND - clean and bright */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* No dark overlay */
.flow-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 5;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    min-height: 100vh;
}

/* HERO */
.hero-wave {
    text-align: center;
    padding: 1rem 0 1.8rem;
}

.whales-image {
    display: inline-block;
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.apply-trigger {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: bold;
    background: #0a2f6c;
    color: white;
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    border-radius: 48px;
    border: 2px solid #0a2f6c;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 0 #041c3f;
    width: auto;
    min-width: 200px;
}

.apply-trigger:hover {
    background: #1e4a8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #041c3f;
}

.apply-trigger.hidden {
    display: none;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 2rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #0a2f6c;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed {
    background: #4caf50;
    color: white;
}

.progress-line {
    width: 60px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.progress-line.active {
    background: #0a2f6c;
}

/* SECTIONS */
.flow-section {
    width: 100%;
    margin: 0;
    padding: 1.5rem 0 1rem;
    border-bottom: 2px dotted #6c9bd4;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #0a2f6c;
    color: #0a2f6c;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: 0.2s;
    white-space: nowrap;
}

.back-btn:hover {
    background: #0a2f6c;
    color: white;
    transform: translateX(-2px);
}

.back-btn.hidden {
    display: none;
}

.flow-divider {
    height: 2px;
    background: linear-gradient(90deg, #8bb9fe, transparent);
    margin: 1.5rem 0 0;
}

.hidden {
    display: none;
}

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0a2f6c;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    flex: 1;
}

.sub {
    color: #1e4a8a;
    margin-bottom: 1.8rem;
    border-left: 4px solid #0a2f6c;
    padding-left: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}

/* inputs */
.input-row {
    margin-bottom: 1.3rem;
    text-align: left;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #0a2f6c;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.6);
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: white;
    border: 2px solid #8bb9fe;
    border-radius: 2rem;
    color: #0a2f6c;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
}

input:focus {
    border-color: #0a2f6c;
    box-shadow: 0 0 0 3px rgba(10,47,108,0.2);
}

/* buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn, .ghost-btn {
    background: white;
    border: 2px solid #0a2f6c;
    padding: 0.7rem 1.6rem;
    border-radius: 3rem;
    font-weight: bold;
    font-size: 1rem;
    color: #0a2f6c;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: none;
    flex: 1;
    min-width: 120px;
}

.primary-btn {
    background: #0a2f6c;
    color: white;
    border: none;
}

.primary-btn:hover {
    background: #1e4a8a;
    transform: translateY(-2px);
}

.primary-btn:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
    background: #6c9bd4;
}

.secondary-btn {
    background: #eef4ff;
    border-color: #0a2f6c;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: #0a2f6c;
    color: #0a2f6c;
}

/* tasks */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.task-item {
    background: rgba(240, 247, 255, 0.95);
    border-radius: 2rem;
    padding: 0.9rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #8bb9fe;
}

.task-name {
    font-weight: bold;
    color: #0a2f6c;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.95rem;
}

.task-actions {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.go-link {
    background: #d9eaff;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    color: #0a2f6c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.1s;
    border: 1px solid #b3d0ff;
    cursor: pointer;
    display: inline-block;
}

.go-link:active {
    transform: scale(0.95);
}

.go-link:hover {
    background: #b3d0ff;
}

.go-link.visited {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
    opacity: 0.7;
    cursor: default;
}

.done-btn {
    background: #cfe3ff;
    border: none;
    color: #0a2f6c;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}

.done-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.done-btn.completed {
    background: #0a2f6c;
    color: white;
}

.comment-group {
    flex: 2;
    min-width: 200px;
    display: flex;
    gap: 0.5rem;
}

.comment-group input {
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.form-feedback {
    margin-top: 1rem;
    padding: 0.6rem;
    border-radius: 2rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.error {
    background: rgba(255, 224, 224, 0.95);
    color: #b00020;
    border-left: 4px solid #b00020;
}

.status {
    background: rgba(224, 240, 255, 0.95);
    color: #0a2f6c;
}

.success-panel {
    text-align: center;
    background: rgba(238, 244, 255, 0.95);
    padding: 1.5rem;
    border-radius: 2rem;
}

.glow-text {
    font-size: 1.2rem;
    margin: 0.8rem 0;
    font-weight: bold;
    color: #0a2f6c;
    background: rgba(255, 255, 255, 0.7);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 30px;
}

.notis-text {
    background: white;
    display: inline-block;
    padding: 0.3rem 1.2rem;
    border-radius: 3rem;
    margin-bottom: 1rem;
    border: 1px solid #0a2f6c;
    color: #0a2f6c;
}

.ref-link-box {
    background: white;
    padding: 0.8rem;
    border-radius: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    border: 1px solid #8bb9fe;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .flow-container {
        padding: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .apply-trigger {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        min-width: 180px;
    }

    .task-item {
        flex-direction: column;
        align-items: stretch;
    }

    .task-name {
        text-align: center;
    }

    .task-actions {
        justify-content: center;
    }

    .comment-group {
        flex-direction: column;
    }

    .comment-group input {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .primary-btn, .secondary-btn, .ghost-btn {
        width: 100%;
        min-width: auto;
    }

    .progress-step {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .progress-line {
        width: 40px;
    }

    .section-header {
        flex-wrap: wrap;
    }

    .back-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .ref-link-box {
        flex-direction: column;
        text-align: center;
    }

    .ref-link-box span {
        font-size: 0.85rem;
        word-break: break-all;
    }

    input, .comment-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .progress-step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .progress-line {
        width: 30px;
    }

    .sub {
        font-size: 0.85rem;
    }

    .glow-text {
        font-size: 1rem;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .flow-container {
        padding: 1.5rem;
    }
}

/* Additional text improvements for readability */
.flow-container p, 
.flow-container span:not(.task-name):not(.glow-text) {
    color: #0a2f6c;
    font-weight: 500;
}

/* Make sure all text has proper contrast against video background */
.flow-section h2,
.flow-section p,
.input-row label,
.task-name,
.glow-text,
.notis-text {
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Success panel text improvements */
.success-panel p {
    color: #0a2f6c;
    font-weight: 500;
}

.success-panel .glow-text {
    color: #0a2f6c;
    font-weight: bold;
    font-size: 1.3rem;
}

/* Ref link box text */
.ref-link-box span {
    color: #0a2f6c;
    font-weight: 600;
    word-break: break-all;
    background: rgba(240, 247, 255, 0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Buttons text */
.primary-btn, .secondary-btn, .ghost-btn, .apply-trigger {
    font-weight: bold;
}

/* Placeholder text color */
input::placeholder {
    color: #6c9bd4;
    opacity: 0.7;
}

/* Section subtitle improvements */
.flow-section .sub {
    background: rgba(255, 255, 255, 0.7);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    border-left: 4px solid #0a2f6c;
}