/* CSS Variables */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5B4BC7;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --warning: #FDCB6E;
    --success: #00B894;
    --dark: #2D3436;
    --light: #F8F9FA;
    --gray: #636E72;
    --white: #FFFFFF;

    --gradient-primary: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    --gradient-accent: linear-gradient(135deg, #FD79A8 0%, #FDCB6E 100%);
    --gradient-fun: linear-gradient(135deg, #00CEC9 0%, #6C5CE7 50%, #FD79A8 100%);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.2);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility Focus Styles */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; }

.highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    animation: spin 10s linear infinite;
}

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

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.btn-premium {
    background: var(--gradient-accent);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Main Content Layout */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Ad Styles */
.ad-banner {
    background: var(--white);
    text-align: center;
    padding: 0.5rem;
}

.ad-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, #e8e8e8 25%, #e8e8e8 50%, #f0f0f0 50%, #f0f0f0 75%, #e8e8e8 75%);
    background-size: 20px 20px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px dashed #ccc;
}

.ad-vertical {
    min-height: 600px;
    width: 160px;
}

/* Premium User - Hide Ads */
.premium-user .ad-banner,
.premium-user .ad-sidebar,
.premium-user .ad-modal {
    display: none !important;
}

.ad-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    .ad-sidebar {
        display: block;
        position: sticky;
        top: 100px;
    }
}

/* Wheel Container */
.wheel-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    max-width: 500px;
    width: 100%;
}

.wheel-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--primary);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#wheel {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(108, 92, 231, 0.3));
    transition: filter 0.3s;
}

#wheel:hover {
    filter: drop-shadow(0 6px 30px rgba(108, 92, 231, 0.4));
}

/* Spin Button */
.spin-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.spin-button:active {
    transform: translateY(0);
}

.spin-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spin-icon {
    animation: bounce 1s infinite;
}

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

/* Options Panel */
.options-panel h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.options-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.option-item:hover {
    background: #E8E8E8;
}

.option-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
}

.option-delete {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.3rem;
    transition: color 0.2s;
}

.option-delete:hover {
    color: #E74C3C;
}

/* Add Option */
.add-option {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-option input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.add-option input:focus {
    outline: none;
    border-color: var(--primary);
}

.add-option button {
    padding: 0.8rem 1.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.add-option button:hover {
    background: var(--primary-dark);
}

.option-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--light);
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #E8E8E8;
    border-color: #D0D0D0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.result-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-fun);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: var(--radius-md);
    background-color: var(--light);
}

.result-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-share {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-share:hover {
    transform: translateY(-2px);
}

.ad-modal {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E8E8E8;
}

/* Premium Modal */
.premium-content {
    max-width: 600px;
}

.premium-tagline {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.pricing-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pricing-card {
    flex: 1;
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.pricing-card.featured {
    border-color: var(--primary);
    background: var(--white);
    transform: scale(1.05);
}

.price-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--white);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card.featured .price-badge {
    background: var(--gradient-accent);
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.price span {
    font-size: 1rem;
    color: var(--gray);
}

.savings {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.features {
    list-style: none;
    text-align: left;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.features li {
    padding: 0.3rem 0;
    color: var(--gray);
}

.btn-buy {
    width: 100%;
    padding: 0.8rem;
    background: var(--light);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy:hover {
    background: var(--primary);
    color: var(--white);
}

.featured-btn {
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Templates Section */
.templates {
    padding: 3rem 1rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.templates h2 {
    margin-bottom: 0.5rem;
}

.templates > p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.template-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.template-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.template-card h4 {
    margin-bottom: 0.3rem;
}

.template-card p {
    font-size: 0.85rem;
    color: var(--gray);
}

.premium-template {
    opacity: 0.8;
}

.premium-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--gradient-accent);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
}

/* How It Works */
.how-it-works {
    padding: 3rem 1rem;
    text-align: center;
    background: var(--white);
}

.how-it-works h2 {
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h4 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    padding: 3rem 1rem;
    text-align: center;
    background: var(--gradient-primary);
    color: var(--white);
}

.newsletter h2 {
    margin-bottom: 0.5rem;
}

.newsletter > p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 450px;
    margin: 0 auto 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: #E8678A;
}

.disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 1rem 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Confetti Effect */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .wheel-container {
        padding: 1.5rem;
    }

    #wheel {
        max-width: 300px;
    }

    .pricing-cards {
        flex-direction: column;
    }

    .pricing-card.featured {
        transform: none;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Animations */
.shake {
    animation: shake 0.5s ease-in-out;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}

/* Exit Intent Modal */
.exit-content {
    max-width: 420px;
}

.exit-tagline {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.exit-offer {
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.offer-image {
    font-size: 3rem;
}

.offer-benefits {
    list-style: none;
    font-size: 0.9rem;
}

.offer-benefits li {
    padding: 0.3rem 0;
    color: var(--dark);
}

.exit-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exit-form input {
    padding: 1rem;
    border: 2px solid #E8E8E8;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
}

.exit-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.exit-form button {
    padding: 1rem;
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.exit-form button:hover {
    transform: translateY(-2px);
}

.exit-dismiss {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
    cursor: pointer;
    text-decoration: underline;
}

.exit-dismiss:hover {
    color: var(--dark);
}

/* Social Proof Toast */
.social-proof-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 500;
    transform: translateX(-150%);
    transition: transform 0.4s ease;
    max-width: 300px;
}

.social-proof-toast.show {
    transform: translateX(0);
}

.proof-icon {
    font-size: 1.5rem;
    animation: spin 2s linear infinite;
}

.proof-text {
    font-size: 0.9rem;
    color: var(--dark);
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    flex: 1;
    font-size: 0.9rem;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
}

.cookie-accept {
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-accept:hover {
    background: var(--primary-dark);
}

.cookie-settings {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-settings:hover {
    background: rgba(255,255,255,0.1);
}

/* Floating Action Button */
.fab-share {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 400;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-share:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(253, 121, 168, 0.4);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    .social-proof-toast {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Urgency Banner */
.urgency-banner {
    background: linear-gradient(90deg, var(--accent), var(--warning));
    color: var(--dark);
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.urgency-banner .countdown {
    font-weight: 800;
}
