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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #fff;
    overflow-x: hidden;
    background: #0a0a0f;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 0, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 200, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(128, 0, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(40px);
    border-radius: 28px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 80px rgba(255, 0, 128, 0.1),
        0 0 120px rgba(0, 200, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

h1 {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff0080, #00d4ff, #8000ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    letter-spacing: -0.5px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    text-align: center;
    margin-bottom: 35px;
    font-weight: 400;
}

.input-group {
    margin-bottom: 25px;
}

.input-group textarea {
    width: 100%;
    padding: 18px 20px;
    font-size: 15px;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    transition: all 0.3s ease;
    resize: none;
    line-height: 1.5;
}

.input-group textarea:focus {
    outline: none;
    border-color: rgba(255, 0, 128, 0.5);
    box-shadow: 
        0 0 0 3px rgba(255, 0, 128, 0.1),
        0 0 20px rgba(255, 0, 128, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 25px;
}

.control-group {
    text-align: center;
}

.control-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.control-group select:focus {
    outline: none;
    border-color: rgba(0, 200, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.1);
}

.control-group select option {
    background: #1a1a2e;
    color: #fff;
}

.control-group input[type="color"] {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    padding: 4px;
}

.control-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.control-group input[type="color"]::-webkit-color-swatch {
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-generate {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, #ff0080, #7928ca, #00d4ff);
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: gradientShift 4s ease infinite;
}

.btn-generate::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.5s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(255, 0, 128, 0.3),
        0 0 40px rgba(121, 40, 202, 0.2);
}

.btn-generate:hover::before {
    left: 100%;
}

.status-message {
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    transition: all 0.3s ease;
}

.status-message.success {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.status-message.error {
    background: rgba(255, 0, 128, 0.15);
    color: #ff0080;
    border: 1px solid rgba(255, 0, 128, 0.3);
}

#qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    border-radius: 20px;
    margin-bottom: 20px;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

#qr-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 0, 128, 0.1), transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: rotate 10s linear infinite;
    opacity: 0.5;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

#qrcode {
    position: relative;
    z-index: 1;
}

#qrcode canvas {
    border-radius: 12px;
}

#qrcode img {
    border-radius: 12px;
}

.btn-download {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-download::before {
    content: '↓';
    font-size: 16px;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    margin-top: 30px;
}

footer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

footer a:hover {
    color: #00d4ff;
}

.copyright {
    display: block;
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 520px) {
    .controls {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        padding: 28px 24px;
        border-radius: 24px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    .btn-generate {
        padding: 14px;
    }
    
    #qr-container {
        padding: 20px;
    }
}
