* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><defs><pattern id=\"grid\" width=\"10\" height=\"10\" patternUnits=\"userSpaceOnUse\"><path d=\"M 10 0 L 0 0 0 10\" fill=\"none\" stroke=\"rgba(255,255,255,0.1)\" stroke-width=\"0.5\"/></pattern></defs><rect width=\"100\" height=\"100\" fill=\"url(%23grid)\"/></svg>');
    opacity: 0.3;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-selector select option {
    background: var(--surface);
    color: var(--text-primary);
}

.header-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(45deg, #ffffff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

main {
    flex: 1;
    padding: 3rem 2rem;
}

.tabs {
    display: flex;
    margin-bottom: 3rem;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
    position: relative;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.input-section, .result-section {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder, textarea::placeholder {
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.primary-btn:active {
    transform: translateY(0);
}

.qr-display {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.qr-display.empty::before {
    content: attr(data-empty-text);
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-style: italic;
}

.qr-display.empty::after {
    content: '📱';
    font-size: 3rem;
    margin-top: 1rem;
    opacity: 0.3;
}

.qr-display img {
    width: 280px;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: white;
    padding: 1rem;
}

.qr-display:not(.empty) {
    background: white;
    border: 1px solid var(--border-color);
}

.download-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.error {
    background: var(--error-color);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.success {
    background: var(--success-color);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        box-shadow: none;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .tabs {
        flex-direction: column;
        padding: 0.25rem;
    }
    
    .tab-button {
        text-align: left;
        border-radius: var(--radius-md);
    }
    
    .input-section, .result-section {
        padding: 1.5rem;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .qr-display {
        padding: 2rem 1rem;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    .header-content h1 {
        font-size: 1.75rem;
    }
    
    main {
        padding: 1.5rem 0.75rem;
    }
    
    .input-section, .result-section {
        padding: 1rem;
    }
    
    input, textarea, .primary-btn {
        font-size: 16px;
    }
}