:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #141b24;
    --glass-bg: rgba(20, 27, 36, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --gradient-start: #ff6b9d;
    --gradient-mid: #c084fc;
    --gradient-end: #22d3ee;
    --accent-pink: #ff6b9d;
    --accent-purple: #c084fc;
    --accent-cyan: #22d3ee;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.comic-font {
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
}

.app-container {
    min-height: 100vh;
    position: relative;
}

/* Floating Particles */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-particle {
    position: absolute;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 50%;
    opacity: 0.3;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-20px) rotate(360deg);
        opacity: 0;
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confetti-fall ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Header */
.header {
    position: relative;
    z-index: 1;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.vibe-counter {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(192, 132, 252, 0.15);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-purple);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper.focused {
    transform: scale(1.01);
}

.idea-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.idea-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.2);
}

.idea-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.char-counter {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vibe-bonus {
    color: var(--accent-cyan);
}

.generate-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(192, 132, 252, 0.3);
}

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

/* Vibe Result */
.vibe-result {
    margin-bottom: 2rem;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.vibe-meter {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.vibe-meter-header {
    margin-bottom: 1rem;
}

.vibe-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.vibe-bar-container {
    height: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    overflow: hidden;
}

.vibe-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    border-radius: 6px;
    transition: width 1s ease;
    animation: pulse-glow 2s ease infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(192, 132, 252, 0.8);
    }
}

.complexity-score {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.complexity-score .comic-font {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.vibe-message {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.share-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: 2px solid var(--accent-purple);
    border-radius: 12px;
    color: var(--accent-purple);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(192, 132, 252, 0.1);
}

/* Tips Section */
.tips-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.tips-carousel {
    text-align: center;
}

.tip-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tip-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.tip-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.tip-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.tip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tip-dot.active {
    background: var(--accent-purple);
    transform: scale(1.2);
}

/* Vibe History */
.vibe-history {
    padding: 1.25rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.clear-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: 1px solid var(--accent-pink);
    border-radius: 6px;
    color: var(--accent-pink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: rgba(255, 107, 157, 0.1);
}

.history-list {
    list-style: none;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-idea {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.history-rating {
    font-size: 1rem;
}

/* Easter Egg */
.easter-egg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

.easter-egg-modal {
    padding: 2rem 3rem;
    text-align: center;
    animation: shake 0.5s ease;
}

.glitch-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff4444;
    margin-bottom: 1rem;
    animation: glitch 0.3s ease infinite;
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-10px);
    }
    40% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(-10px);
    }
    80% {
        transform: translateX(10px);
    }
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-link {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-purple);
}

/* Responsive */
@media (max-width: 480px) {
    .header {
        padding: 2rem 1rem 1.5rem;
    }

    .main-content {
        padding: 0 1rem 2rem;
    }

    .idea-input {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }

    .generate-btn {
        font-size: 1rem;
    }

    .vibe-message {
        font-size: 1.25rem;
    }

    .tip-card {
        padding: 1.25rem;
    }
}