/* CSS Custom Properties for Theme Management */
:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    --bg-gradient: linear-gradient(135deg, #dbeafe 0%, #e9d5ff 50%, #fce7f3 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

.dark {
    --bg-gradient: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
    --card-bg: rgba(31, 41, 55, 0.8);
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Navigation Styles */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #3b82f6;
    transform: translateY(-1px);
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 50%;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover:after {
    width: 100%;
}

/* Main Section Styles */
.main-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 8rem);
}

.main-container {
    width: 100%;
    max-width: 1200px;
    padding: 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 0.5rem;
}

.main-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.input-group {
    position: relative;
}

.text-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.color-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.color-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* QR Preview Section */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.qr-container {
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.qr-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.download-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn:active {
    transform: translateY(0);
}

/* About Section */
.about-section {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e9d5ff 50%, #fce7f3 100%);
}

.dark .about-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #1f2937 100%);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1.5rem;
}

.about-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-title.blue {
    color: #3b82f6;
}

.feature-title.purple {
    color: #8b5cf6;
}

.feature-title.pink {
    color: #ec4899;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
        margin: 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .color-controls {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.875rem;
    }

    .main-title {
        font-size: 1.75rem;
    }

    .main-subtitle {
        font-size: 1rem;
    }

    .about-title {
        font-size: 1.75rem;
    }
}

/* Animation and Transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-container {
    animation: fadeIn 0.8s ease-out;
}

.feature-card {
    animation: fadeIn 0.8s ease-out;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.text-input:invalid {
    border-color: #ef4444;
}

/* Focus Accessibility */
.btn:focus-visible,
.text-input:focus-visible,
.color-select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}