@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #00ff88;
    --primary-orange: #ff6b35;
    --primary-red: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --bg-primary: #000000;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-primary: rgba(255, 255, 255, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.3);
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.main-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 80px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out forwards;
    max-width: 800px;
    width: 100%;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-green);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#output {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
}

#output img {
    max-width: 95%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    display: block;
    margin: 0 auto;
}

.download-btn {
    padding: 12px 24px;
    background: var(--primary-green);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: 20px;
    width: 200px;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.download-btn:hover {
    background: var(--primary-orange);
    transform: translateY(-2px);
}

.download-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .main-grid {
        flex-direction: column;
        text-align: center;
    }

    .glass-card {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .glass-card {
        padding: 20px;
        max-width: 90%;
    }

    #output img {
        max-width: 100%;
    }

    .download-btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}