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

body.story-modal-open {
    overflow: hidden;
}

body.story-modal-open .voice-input-container,
body.story-modal-open .story-subtitle,
body.story-modal-open #transcribed-text {
    visibility: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Header */
.site-header {
    padding: 1rem 0;
    text-align: center;
}

.logo {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Hero */
.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typewriter cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.5em;
    background-color: rgba(255, 255, 255, 0.9);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Benefits Grid Desktop */
.benefits-grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.benefit-card-desktop {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: floatCard 3s ease-in-out infinite;
}

.benefit-card-desktop:nth-child(1) { animation-delay: 0s; }
.benefit-card-desktop:nth-child(2) { animation-delay: 0.5s; }
.benefit-card-desktop:nth-child(3) { animation-delay: 1s; }

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

.benefit-card-desktop:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.benefit-icon-desktop {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.benefit-card-desktop h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: #333;
}

.benefit-card-desktop p {
    color: #666;
    font-size: 0.95rem;
}

/* Carousel Container Mobile */
.carousel-container {
    display: none;
    overflow: hidden;
    margin-bottom: 1.25rem;
    position: relative;
}

.carousel-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: block;
}

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

.benefit-card-single {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.benefit-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: sparkle 2s ease-in-out infinite;
}

.benefit-card-single h3 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    color: #333;
}

.benefit-card-single p {
    color: #666;
    font-size: 1rem;
}

.carousel-dots {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Email Form Panel */
.email-form-panel {
    background: white;
    padding: 2rem 1.75rem;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.25rem;
    animation: slideUp 0.8s ease-out;
}

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

.email-form-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: #333;
    text-align: center;
}

#email-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#name-input,
#email-input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#name-input:focus,
#email-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#submit-btn {
    padding: 1rem 1.75rem;
    font-size: 1.1rem;
    color: white;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border: 3px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    animation: borderPulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: transform 0.3s ease;
}

#submit-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    padding: 3px;
    background: linear-gradient(45deg, #ff4444, #ffff00, #ff4444);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderAnimation 3s linear infinite;
    z-index: -1;
}

#submit-btn:hover {
    background: linear-gradient(135deg, #ff6666 0%, #ff0000 100%);
    transform: translateY(-2px);
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes borderPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 68, 68, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    }
}

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Badge Below Button */
.offer-badge-below {
    text-align: center;
    margin-top: 1rem;
}

.badge-text-below {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

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

/* Counter */
.counter-container-below {
    text-align: center;
    margin-bottom: 0.75rem;
}

.counter-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.counter-icon {
    font-size: 1.6rem;
    animation: rotate 3s linear infinite;
}

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

.counter-text {
    color: white;
    font-size: 1rem;
}

.counter-number {
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 0.35rem;
}

.counter-label {
    font-size: 0.95rem;
}

/* Skip Button */
.skip-preview {
    text-align: center;
    margin-top: 0.75rem;
}

.skip-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.65rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Section Transitions */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* Story Section */
.story-title {
    font-size: 2.5rem;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.story-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 3rem;
}

/* Voice Input */
.voice-input-container {
    text-align: center;
    margin-bottom: 2rem;
}

.mic-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: pulseMic 2s ease-in-out infinite;
}

@keyframes pulseMic {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }
}

.mic-button:hover {
    transform: scale(1.1);
}

.mic-button.recording {
    background: #ff4444;
    animation: recordingPulse 1s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 68, 68, 0);
    }
}

.mic-icon {
    width: 60px;
    height: 60px;
    fill: #667eea;
}

.recording-status {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

/* Transcribed Text */
.transcribed-text {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 3rem;
}

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

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

.loading-container p {
    color: white;
    font-size: 1.1rem;
}

/* Story Result */
.story-result {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 7, 35, 0.92);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.story-result.show {
    display: flex;
}

.story-result-content {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 2rem;
    width: min(90vw, 720px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

#story-video {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.story-success-message {
    font-size: 1.2rem;
    text-align: center;
    color: #334155;
}

.story-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.secondary-button {
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.buy-now-button {
    display: none;
    background: linear-gradient(135deg, #ff7a18 0%, #af002d 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.buy-now-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(175, 0, 45, 0.35);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        min-height: 2.5rem;
    }

    .benefits-grid-desktop {
        display: none;
    }

    .carousel-container {
        display: block;
    }

    .carousel-dots {
        display: flex;
    }

    .email-form-panel {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .email-form-panel h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 1rem;
    }

    .story-title {
        font-size: 1.8rem;
    }

    .story-subtitle {
        font-size: 1rem;
    }

    .mic-button {
        width: 100px;
        height: 100px;
    }

    .mic-icon {
        width: 50px;
        height: 50px;
    }

    .counter-wrapper {
        padding: 0.8rem 1.5rem;
    }

    .counter-number {
        font-size: 1.2rem;
    }

    .counter-label {
        font-size: 0.9rem;
    }

    .story-result-content {
        width: min(92vw, 540px);
        padding: 1.75rem;
        border-radius: 22px;
    }
}

/* Limit Popup */
#limit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.limit-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.limit-popup-content {
    position: absolute;
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    z-index: 1;
    margin: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.limit-popup-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.limit-popup-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.limit-popup-buttons {
    display: flex;
    margin-top: 2rem;
    justify-content: center;
}

.buy-button {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 68, 68, 0.3);
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        min-height: 2rem;
    }

    .email-form-panel {
        padding: 1.5rem 1rem;
    }

    #name-input,
    #email-input,
    #submit-btn {
        font-size: 1rem;
    }

    .limit-popup-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
        width: 90%;
    }

    .limit-popup-content h2 {
        font-size: 1.5rem;
    }

    .limit-popup-content p {
        font-size: 1rem;
    }

    .buy-button {
        width: 100%;
    }
}
