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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: visible;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.header p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 400;
}

.input-section {
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: nowrap;
}

#urlInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

#urlInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#urlInput::placeholder {
    color: #a0aec0;
}

#generateBtn {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 160px;
    max-width: 200px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

#generateBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#generateBtn:active {
    transform: translateY(0);
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-section {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.qr-section.show {
    display: block;
}

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

.qr-container {
    background: #f7fafc;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    border: 2px solid #e2e8f0;
    position: relative;
    z-index: 1;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

#qrcode > div {
    position: relative !important;
}

#qrcode canvas,
#qrcode img {
    position: relative !important;
    z-index: 3 !important;
}

#qrcode canvas {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

#downloadBtn,
#clearBtn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#downloadBtn {
    background: #48bb78;
    color: white;
}

#downloadBtn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

#clearBtn {
    background: #fed7d7;
    color: #c53030;
}

#clearBtn:hover {
    background: #feb2b2;
    transform: translateY(-1px);
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.footer p {
    color: #718096;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #generateBtn {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    .qr-actions {
        flex-direction: column;
    }
    
    #downloadBtn,
    #clearBtn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #generateBtn {
        font-size: 0.9rem;
        padding: 14px 20px;
    }
}
