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

:root {
    --pink-primary: #FF69B4;
    --green-accent: #00FF7F;
    --card-bg: #FFF5F8;
    --text-dark: #4A2040;
    --pink-light: #FFB6C1;
    --green-light: #98FB98;
    --lavender: #E6E6FA;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, var(--pink-primary) 0%, #FF85C1 50%, #FFB6C1 100%);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

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

.sparkle {
    position: absolute;
    bottom: -50px;
    animation: floatUp linear infinite;
    opacity: 0.7;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

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

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

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

/* Main content */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 3px 3px 0 var(--green-accent), 
                 -1px -1px 0 var(--pink-light),
                 0 0 20px rgba(0, 255, 127, 0.5);
    animation: titleBounce 2s ease-in-out infinite;
}

.title-emoji {
    display: inline-block;
    animation: sparkleRotate 3s ease-in-out infinite;
}

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

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

.favorites-toggle {
    background: white;
    border: 3px solid var(--green-accent);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.favorites-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 127, 0.3);
}

/* Input section */
.input-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.mood-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 3px solid var(--pink-light);
    border-radius: 50px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    background: white;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
}

.mood-input:focus {
    border-color: var(--green-accent);
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.3);
}

.mood-input::placeholder {
    color: #B8A0B0;
}

.emoji-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.mood-emoji-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--pink-light);
    background: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-emoji-btn:hover {
    transform: scale(1.2);
    border-color: var(--green-accent);
    box-shadow: 0 4px 15px rgba(0, 255, 127, 0.3);
}

/* Tone toggle */
.tone-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tone-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    color: white;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.tone-label.active {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tone-toggle {
    width: 60px;
    height: 30px;
    border-radius: 50px;
    background: var(--pink-light);
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tone-toggle.spicy {
    background: var(--green-accent);
}

.toggle-knob {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tone-toggle.spicy .toggle-knob {
    left: 32px;
}

/* Generate button */
.generate-btn {
    display: block;
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--green-accent) 0%, #50FF9F 100%);
    border: none;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(0, 255, 127, 0.4);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 255, 127, 0.5);
}

.generate-btn:active:not(:disabled) {
    transform: scale(0.98);
}

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

.generate-btn.loading {
    background: linear-gradient(135deg, var(--pink-light) 0%, var(--green-light) 100%);
    animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Compliments container */
.compliments-container {
    margin-top: 2rem;
}

.compliments-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Compliment card */
.compliment-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), 
                      linear-gradient(135deg, var(--pink-light), var(--green-light));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: cardPop 0.5s ease-out backwards;
}

@keyframes cardPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tone-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.tone-genuine {
    background: linear-gradient(135deg, #FFE4EC, #FFF0F5);
    color: #D4619B;
}

.tone-sarcastic {
    background: linear-gradient(135deg, #E8FFF0, #F0FFF4);
    color: #2E8B57;
}

.tone-hype {
    background: linear-gradient(135deg, #FFF8DC, #FFFACD);
    color: #DAA520;
}

.compliment-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    padding-right: 2.5rem;
}

.favorite-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(0.5);
}

.favorite-btn:hover {
    transform: scale(1.2);
    filter: grayscale(0);
}

.favorite-btn.is-favorite {
    filter: grayscale(0);
    animation: heartBeat 0.5s ease-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Action buttons */
.compliment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.more-btn, .clear-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.more-btn {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green-accent) 100%);
    border: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 255, 127, 0.3);
}

.more-btn:hover:not(:disabled) {
    transform: scale(1.03);
}

.more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.clear-btn {
    background: white;
    border: 3px solid var(--pink-light);
    color: var(--text-dark);
}

.clear-btn:hover {
    border-color: var(--pink-primary);
    background: var(--card-bg);
}

/* Favorites drawer */
.favorites-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.favorites-drawer {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--pink-light);
}

.favorites-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.close-drawer-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-drawer-btn:hover {
    background: var(--pink-light);
}

.favorites-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.no-favorites {
    text-align: center;
    color: #B8A0B0;
    padding: 2rem;
    font-style: italic;
}

.favorite-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 15px;
    position: relative;
    padding-right: 3rem;
}

.remove-fav-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.remove-fav-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    background: linear-gradient(transparent, rgba(255, 105, 180, 0.9));
    z-index: 10;
}

.footer a {
    color: white;
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 640px) {
    .title {
        font-size: 1.8rem;
    }
    
    .mood-input {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .mood-emoji-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .generate-btn {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
    
    .tone-toggle-container {
        gap: 0.5rem;
    }
    
    .tone-label {
        font-size: 0.8rem;
    }
    
    .compliment-text {
        font-size: 1rem;
    }
    
    .more-btn, .clear-btn {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
}