* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #24243e 50%, #302b63 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    gap: 32px;
}

/* Desktop only - complex background and animations */
@media (min-width: 769px) and (min-resolution: 1dppx) {
    body {
        background: 
            radial-gradient(circle at 20% 80%, rgba(255, 0, 102, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
            linear-gradient(135deg, #0f0c29 0%, #24243e 25%, #302b63 50%, #0f0c29 75%, #24243e 100%);
        background-size: 100% 100%, 100% 100%, 100% 100%, 300% 300%;
        animation: gradientShiftBackground 20s ease-in-out infinite;
    }
}

@keyframes gradientShiftBackground {
    0%, 100% { 
        background-position: 0% 50%, 100% 50%, 50% 100%, 0% 50%; 
    }
    33% { 
        background-position: 100% 50%, 0% 50%, 100% 0%, 50% 100%; 
    }
    66% { 
        background-position: 50% 100%, 50% 0%, 0% 50%, 100% 50%; 
    }
}

/* Particles - desktop only */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Hide particles completely on mobile */
@media (max-width: 768px) {
    .particles {
        display: none;
    }
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(139, 92, 246, 0.2), rgba(255, 0, 102, 0.15));
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
    filter: blur(1px);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Additional floating elements - desktop only */
@media (min-width: 769px) {
    .particles::before {
        content: '';
        position: absolute;
        top: 10%;
        left: 10%;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(255, 0, 102, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        animation: pulse 6s ease-in-out infinite;
    }

    .particles::after {
        content: '';
        position: absolute;
        bottom: 10%;
        right: 10%;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
        border-radius: 50%;
        animation: pulse 8s ease-in-out infinite reverse;
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.2;
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        opacity: 0.6;
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    33% { 
        transform: translateY(-25px) rotate(120deg) scale(1.05);
        opacity: 0.7;
    }
    66% { 
        transform: translateY(-12px) rotate(240deg) scale(0.95);
        opacity: 0.5;
    }
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 1px;
    z-index: 1;
    position: relative;
}

/* Header glow effect - desktop only */
@media (min-width: 769px) {
    .header-section::before {
        content: '';
        position: absolute;
        top: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(255, 0, 102, 0.2) 0%, transparent 70%);
        border-radius: 50%;
        animation: headerGlow 4s ease-in-out infinite alternate;
        z-index: -1;
    }
}

@keyframes headerGlow {
    0% { 
        transform: translateX(-50%) scale(0.8);
        opacity: 0.2;
    }
    100% { 
        transform: translateX(-50%) scale(1.2);
        opacity: 0.6;
    }
}

.header-section h1 {
    font-size: 4.6em;
    font-family: 'Inter', sans-serif; /* Changed from Poppins to reduce font requests */
    font-weight: 900;
    background: linear-gradient(135deg, #ff0066, #ff6b35, #f7931e, #ffcd3c, #8b5cf6, #06b6d4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -2px;
    filter: drop-shadow(0 4px 8px rgba(255, 0, 102, 0.3)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.2));
    position: relative;
    line-height: 0.9;
}

/* Text animation - desktop only */
@media (min-width: 769px) {
    .header-section h1 {
        animation: gradientShiftText 8s ease-in-out infinite;
    }
}

/* Disable text animation on mobile */
@media (max-width: 768px) {
    .header-section h1 {
        animation: none;
        background: linear-gradient(135deg, #ff0066, #8b5cf6);
        filter: none; /* Remove expensive drop shadows */
    }
}

@keyframes gradientShiftText {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 100% 0%; }
}

.header-section h1 .line1 {
    display: block;
}

.header-section h1 .line2 {
    display: block;
}

/* Floating geometric shapes - desktop only */
@media (min-width: 769px) {
    .floating-shape {
        position: absolute;
        pointer-events: none;
        animation: floatShape 15s ease-in-out infinite;
    }

    .floating-shape.triangle {
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 14px solid rgba(255, 0, 102, 0.2);
        filter: blur(0.5px);
    }

    .floating-shape.square {
        width: 12px;
        height: 12px;
        background: rgba(59, 130, 246, 0.2);
        border-radius: 2px;
        filter: blur(0.5px);
    }

    .floating-shape.diamond {
        width: 10px;
        height: 10px;
        background: rgba(139, 92, 246, 0.2);
        transform: rotate(45deg);
        filter: blur(0.5px);
    }
}

/* Hide floating shapes on mobile */
@media (max-width: 768px) {
    .floating-shape {
        display: none;
    }
}

@keyframes floatShape {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.2;
    }
    25% { 
        transform: translateY(-30px) rotate(90deg) scale(1.1);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg) scale(0.9);
        opacity: 0.4;
    }
    75% { 
        transform: translateY(-20px) rotate(270deg) scale(1.05);
        opacity: 0.5;
    }
}

.header-section .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4em;
    font-family: 'Inter', sans-serif; /* Changed from Poppins */
    font-weight: 300;
    margin-bottom: 8px;
}

.header-section .sub-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1em;
    font-weight: 400;
}

.container {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 30px rgba(139, 92, 246, 0.15);
    position: relative;
    z-index: 1;
}

/* Desktop only - backdrop blur */
@media (min-width: 769px) {
    .container {
        backdrop-filter: blur(25px);
    }
}

/* Mobile - no backdrop blur, simplified background */
@media (max-width: 768px) {
    .container {
        background: rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 8px;
    font-size: 2.5em;
    font-weight: 800;
    letter-spacing: -1px;
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    color: white;
    font-weight: 500;
    font-size: 1em;
}

.form-label .emoji {
    font-size: 1.2em;
}

input, select, textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 56px;
    box-sizing: border-box;
}

/* Desktop only - backdrop blur on form elements */
@media (min-width: 769px) {
    input, select, textarea {
        backdrop-filter: blur(10px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    input, select, textarea {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Custom dropdown arrow */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 50px;
}

textarea {
    height: 80px;
    resize: none;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

select option {
    background: #1e1b4b;
    color: white;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.style-btn {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
}

/* Desktop only - backdrop blur on style buttons */
@media (min-width: 769px) {
    .style-btn {
        backdrop-filter: blur(10px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .style-btn {
        background: rgba(255, 255, 255, 0.12);
    }
}

/* Desktop only - hover effects */
@media (min-width: 769px) {
    .style-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    }
}

.style-btn.active {
    background: linear-gradient(135deg, #ffa4683d, #e54e1b1f);
    border-color: #ffffff85;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ec489999 0%, #8b5cf685 50%, #3b82f69e 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 60px;
}

/* Desktop only - button shimmer effect */
@media (min-width: 769px) {
    .generate-btn:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.6s;
    }

    .generate-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
    }

    .generate-btn:hover:before {
        left: 100%;
    }
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-card {
    margin-top: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: none;
}

/* Desktop only - backdrop blur on result card */
@media (min-width: 769px) {
    .result-card {
        backdrop-filter: blur(20px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .result-card {
        background: rgba(255, 255, 255, 0.12);
    }
}

.result-card.show {
    display: block;
    animation: slideIn 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pickup-line {
    font-size: 1.3em;
    color: white;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-weight: 500;
    line-height: 1.6;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60px;
}

/* Desktop only - hover effects */
@media (min-width: 769px) {
    .pickup-line:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
}

/* Desktop only - backdrop blur on action buttons */
@media (min-width: 769px) {
    .action-btn {
        backdrop-filter: blur(10px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .action-btn {
        background: rgba(255, 255, 255, 0.12);
    }
}

/* Desktop only - hover effects */
@media (min-width: 769px) {
    .action-btn.good:hover {
        background: linear-gradient(135deg, #10b981, #059669);
        border-color: #10b981;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    }

    .action-btn.bad:hover {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        border-color: #ef4444;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    }
}

/* Stats Container */
.stats-container {
    display: flex;
    gap: 16px;
    max-width: 480px;
    width: 100%;
    z-index: 1;
    position: relative;
}

.stat-card {
    flex: 1;
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Desktop only - backdrop blur on stat cards */
@media (min-width: 769px) {
    .stat-card {
        backdrop-filter: blur(20px);
    }
    
    .stat-card:hover {
        transform: translateY(-5px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .stat-card {
        background: rgba(255, 255, 255, 0.12);
    }
}

.stat-card .stat-number {
    font-size: 2.8em;
    font-weight: 900;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Links for SEO */
.content-links {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 480px;
    width: 100%;
}

.content-links h3 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 700;
}

.link-grid {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.content-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
}

/* Desktop only - backdrop blur on content links */
@media (min-width: 769px) {
    .content-link {
        backdrop-filter: blur(10px);
    }
    
    .content-link:hover {
        color: white;
        border-color: #ff6b35;
        background: rgba(255, 107, 53, 0.1);
        transform: translateY(-2px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .content-link {
        background: rgba(255, 255, 255, 0.12);
    }
    
    .link-grid {
        flex-direction: column;
        align-items: center;
    }
}

.loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.loading.show {
    display: block;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 1.1em;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: 600;
    max-width: calc(100vw - 40px);
}

/* Desktop only - backdrop blur on toast */
@media (min-width: 769px) {
    .toast {
        backdrop-filter: blur(20px);
    }
    
    .toast.show {
        transform: translateX(0);
    }
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
    .toast {
        top: 15px;
        right: 15px;
        left: 15px;
        transform: translateY(-100px);
        text-align: center;
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@media (max-width: 768px) {
    .header-section h1 {
        font-size: 3.6em;
    }
    
    .header-section .subtitle {
        font-size: 1.2em;
    }
    
    .container {
        padding: 32px 24px;
        margin: 10px;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
        gap: 24px;
    }
    
    .header-section h1 {
        font-size: 3.2em;
        font-weight: 900;
    }
    
    .container {
        padding: 24px 20px;
    }
    
    .pickup-line {
        font-size: 1.2em;
        padding: 18px;
    }
    
    .stats-container {
        gap: 10px;
    }
    
    .stat-card {
        padding: 20px 12px;
    }
    
    .stat-card .stat-number {
        font-size: 2.4em;
    }
    
    /* Better mobile form styling */
    select, input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 18px;
        height: 54px;
    }
    
    select {
        padding-right: 45px;
        background-size: 14px;
        background-position: right 14px center;
    }
    
    textarea {
        font-size: 16px;
        padding: 14px 18px;
        height: 80px;
    }
    
    .form-label {
        font-size: 0.95em;
        margin-bottom: 8px;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .style-btn {
        padding: 12px 10px;
        font-size: 13px;
        min-height: 48px;
    }
    
    .generate-btn {
        font-size: 16px;
        padding: 16px;
    }
}

/* Footer */
.footer {
    margin-top: 24px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
    z-index: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

/* Desktop only - backdrop blur on footer */
@media (min-width: 769px) {
    .footer {
        backdrop-filter: blur(20px);
    }
}

/* Mobile - no backdrop blur */
@media (max-width: 768px) {
    .footer {
        background: rgba(255, 255, 255, 0.12);
        flex-direction: column;
        gap: 12px;
    }
}

.footer-credits {
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.9);
}