/* assets/css/style.css */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #22d3ee;
    --accent-color: #f59e0b;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 65px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--dark-surface);
    transition: left 0.3s;
    z-index: 999;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--dark-border);
}

/* Hero Section */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: 60vh;
}

/* QR Generator Wrapper */
.qr-generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Panels */
.input-panel,
.preview-panel {
    background: var(--dark-surface);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--dark-border);
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* QR Type Selector */
.qr-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.type-btn {
    background: var(--dark-bg);
    border: 2px solid var(--dark-border);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.type-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.type-btn i {
    font-size: 1.2rem;
}

/* Input Forms */
.input-form {
    display: none;
}

.input-form.active {
    display: block;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--dark-bg);
    border: 2px dashed var(--dark-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-wrapper.small .file-label {
    padding: 1rem;
    flex-direction: row;
    gap: 0.5rem;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.file-label i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.file-upload-wrapper.small .file-label i {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.file-info {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Customization Section */
.customization-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-border);
}

.customization-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.customize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.customize-item {
    margin-bottom: 1rem;
}

.customize-item.full-width {
    grid-column: 1 / -1;
}

.range-input {
    width: 100%;
    margin-top: 0.5rem;
}

.range-value {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}

.color-text {
    flex: 1;
    padding: 0.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 0.25rem;
    color: var(--text-primary);
}

/* Buttons */
.btn-generate {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Preview Panel */
.qr-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-preview {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.preview-placeholder {
    text-align: center;
    color: #94a3b8;
}

.preview-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Download Section */
.download-section {
    width: 100%;
    margin-bottom: 2rem;
}

.download-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.btn-download {
    padding: 0.75rem;
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Stats Section */
.stats-section {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 0.5rem;
    min-width: 100px;
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Features Section */
.features-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--dark-border);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--dark-surface);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--dark-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--dark-border);
    background: var(--dark-surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 30px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-surface);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-xl);
    transition: bottom 0.3s;
    z-index: 10001;
}

.toast.show {
    bottom: 30px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* Checkbox Wrapper */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .qr-generator-wrapper {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .qr-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .customize-grid {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .input-panel,
    .preview-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .qr-type-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .type-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .type-btn i {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-section {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        width: 100%;
    }

    .toast {
        width: 90%;
        left: 5%;
        transform: none;
    }
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .download-section,
    .customization-section,
    .features-section {
        display: none;
    }

    .qr-preview {
        border: none;
        box-shadow: none;
    }
}