* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a1a2e 0%, #0f2a47 50%, #1a3a52 100%);
    color: #e0e0e0;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.step {
    display: none;
    animation: slideIn 0.6s ease-in-out;
    opacity: 0;
}

.step.active {
    display: block;
    animation: slideIn 0.6s ease-in-out forwards;
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    background: rgba(15, 42, 71, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #0066cc;
    border-radius: 20px;
    padding: 40px 35px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.3);
    animation: popIn 0.5s ease-out;
    margin-bottom: 40px;
}

@keyframes popIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

h1 {
    font-size: 2.5em;
    color: #0066cc;
    margin-bottom: 25px;
    margin-top: 0;
    text-shadow: 0 0 20px rgba(0, 102, 204, 0.5);
    letter-spacing: 2px;
    line-height: 1.2;
}

.love-note p.typing::after {
    content: '_';
    animation: blink 0.7s infinite;
    margin-left: 2px;
    color: #00a8ff;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.bmw-logo-header {
    font-size: 1.3em;
    color: #00a8ff;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(0, 168, 255, 0.4);
    animation: glow-text 2s ease-in-out infinite;
}

@keyframes glow-text {
    0%, 100% {
        text-shadow: 0 0 15px rgba(0, 168, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 168, 255, 0.7);
    }
}

h2 {
    font-size: 2em;
    color: #00a8ff;
    margin-bottom: 25px;
    margin-top: 0;
    line-height: 1.3;
}

/* BMW Logo */
.bmw-logo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.bmw-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px rgba(0, 102, 204, 0.6));
    animation: float-logo 3s ease-in-out infinite;
}

@keyframes float-logo {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

h3 {
    color: #00a8ff;
    margin-bottom: 15px;
}

p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #d0d0d0;
}

.intro-text {
    font-size: 1.2em;
    color: #b0d4ff;
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.15em;
    color: #b0d4ff;
    margin-bottom: 30px;
    font-weight: 500;
}

.emoji-rain {
    font-size: 3em;
    margin: 30px 0;
    animation: float 3s ease-in-out infinite;
    letter-spacing: 20px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.joke-text {
    font-style: italic;
    color: #66b3ff;
    margin-top: 20px;
    font-size: 0.95em;
    border-left: 3px solid #0066cc;
    padding-left: 15px;
}

/* Buttons */
.btn-next, .option-btn, .btn-restart, .btn-surprise {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    font-size: 1em;
    border-radius: 50px;
    cursor: pointer;
    margin: 12px 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.btn-next:hover, .option-btn:hover, .btn-restart:hover, .btn-surprise:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.6);
    background: linear-gradient(135deg, #0099ff 0%, #00ccff 100%);
}

.btn-next:active, .option-btn:active, .btn-restart:active, .btn-surprise:active {
    transform: translateY(0);
}

.option-btn {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    padding: 16px 24px;
    text-align: left;
    font-size: 0.95em;
    position: relative;
    transition: all 0.3s ease;
}

.option-btn:before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #00a8ff;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.option-btn.selected {
    background: linear-gradient(135deg, #0099ff 0%, #00ccff 100%);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.8) inset 0 0 0 3px rgba(0, 204, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
    border: 2px solid #00ccff;
}

.option-btn.selected:before {
    opacity: 1;
    background: #00a8ff;
    width: 12px;
    height: 12px;
}

.option-btn.selected:after {
    content: '✓';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 1.2em;
}

.options {
    margin: 30px 0;
}

/* Media Container - Masonry Grid Layout */
.media-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px auto;
    max-width: 100%;
    perspective: 1000px;
}

.media-item {
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #0066cc;
    transition: all 0.4s ease;
    background: rgba(0, 102, 204, 0.1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.4);
    transform-style: preserve-3d;
    height: fit-content;
}

.media-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.6);
    border-color: #00a8ff;
}

.media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.95);
    transition: all 0.3s ease;
}

.media {
    width: 100%;
    height: auto;
    min-height: 250px;
    max-height: 400px;
    object-fit: cover;
    display: block;
    filter: brightness(0.95);
    transition: all 0.3s ease;
}

.media-item:hover .media {
    filter: brightness(1.1) contrast(1.1);
}

video.media {
    background: #0a1a2e;
}

.media-caption {
    background: rgba(0, 102, 204, 0.2);
    padding: 12px;
    color: #00a8ff;
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
}

/* Love Note */
.love-note {
    background: rgba(0, 102, 204, 0.1);
    border: 2px solid #0066cc;
    border-radius: 15px;
    padding: 35px;
    margin: 30px auto;
    max-width: 700px;
    text-align: left;
    line-height: 1.9;
    font-size: 1.05em;
    color: #b0d4ff;
}

.love-note p {
    margin-bottom: 18px;
}

.love-note p:first-child {
    margin-top: 0;
}

/* Message Section */
.message-section {
    margin: 40px 0;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #0066cc;
    border-radius: 10px;
    background: rgba(10, 26, 46, 0.8);
    color: #e0e0e0;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #00a8ff;
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.3);
}

textarea::placeholder {
    color: #666;
}

/* Final Surprise */
.final-surprise {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2) 0%, rgba(0, 168, 255, 0.15) 100%);
    border: 3px solid #0066cc;
}

.surprise-title {
    font-size: 3em;
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: 30px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.surprise-box {
    background: rgba(0, 102, 204, 0.15);
    border: 2px solid #00a8ff;
    border-radius: 15px;
    padding: 40px 35px;
    margin: 30px auto;
    max-width: 700px;
}

.surprise-message {
    font-size: 2.2em;
    color: #00ccff;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(0, 204, 255, 0.5);
}

.surprise-text {
    font-size: 1.3em;
    color: #66b3ff;
    margin-bottom: 20px;
}

.surprise-details {
    font-size: 1.05em;
    color: #b0d4ff;
    margin: 20px 0;
}

.surprise-footer {
    margin-top: 25px;
    color: #99c2ff;
    font-style: italic;
}

.btn-restart {
    margin-top: 30px;
}

/* Music Control */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    animation: pulse-music 2s ease-in-out infinite;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.6);
}

@keyframes pulse-music {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 102, 204, 0.7);
    }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #0066cc;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 10s linear infinite;
}

@keyframes float-particle {
    to {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 25px 15px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.6em;
    }

    .step-content {
        padding: 35px 22px;
        border-radius: 15px;
        margin-bottom: 30px;
    }

    .emoji-rain {
        font-size: 2em;
        letter-spacing: 10px;
    }

    .media-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .media {
        min-height: 220px;
        max-height: 350px;
    }

    .love-note {
        padding: 28px;
        font-size: 1em;
        line-height: 1.8;
    }

    .surprise-title {
        font-size: 2.2em;
    }

    .surprise-message {
        font-size: 1.6em;
    }

    .surprise-box {
        padding: 35px 25px;
    }

    textarea {
        min-height: 100px;
        font-size: 16px;
    }

    .btn-next, .option-btn, .btn-restart, .btn-surprise {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px;
    }

    .option-btn {
        font-size: 0.92em;
        padding: 15px 20px;
    }

    .bmw-logo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 20px 12px;
    }

    .step-content {
        padding: 30px 20px;
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 102, 204, 0.2);
        margin-bottom: 25px;
    }

    h1 {
        font-size: 1.7em;
        margin-bottom: 18px;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 1.15em;
        margin-bottom: 15px;
    }

    p {
        font-size: 1em;
        line-height: 1.6;
    }

    .btn-next, .option-btn, .btn-restart, .btn-surprise {
        padding: 14px 20px;
        font-size: 0.95em;
        width: 100%;
        margin: 10px 0;
    }

    .option-btn {
        max-width: 100%;
        text-align: center;
        padding: 15px 20px;
    }

    .option-btn.selected:after {
        right: 18px;
    }

    .emoji-rain {
        font-size: 1.9em;
        letter-spacing: 10px;
        margin: 22px 0;
    }

    .love-note {
        padding: 25px;
        font-size: 0.98em;
        line-height: 1.75;
        margin: 22px auto;
    }

    .surprise-box {
        padding: 32px 22px;
        margin: 22px auto;
    }

    .surprise-title {
        font-size: 2em;
        margin-bottom: 22px;
    }

    .surprise-message {
        font-size: 1.45em;
        margin: 18px 0;
    }

    textarea {
        min-height: 110px;
        padding: 14px;
        font-size: 16px;
        margin-bottom: 15px;
    }

    .message-section {
        margin: 28px 0;
    }

    .media {
        min-height: 200px;
        max-height: 300px;
    }

    .intro-text {
        font-size: 1.05em;
    }

    .question-text {
        font-size: 1.05em;
        margin-bottom: 22px;
    }

    .joke-text {
        font-size: 0.92em;
        padding-left: 14px;
        border-left: 2px solid #0066cc;
        margin-top: 15px;
    }

    .bmw-logo {
        width: 85px;
        height: 85px;
    }

    .bmw-logo-header {
        font-size: 1.15em;
        letter-spacing: 2px;
    }

    .music-btn {
        width: 48px;
        height: 48px;
        font-size: 1.4em;
    }

    .media-caption {
        font-size: 0.88em;
        padding: 11px;
    }
}
