/* QR Generator Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Generator Section */
.generator-section {
    padding: 3rem 0;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.panel-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.panel-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.938rem;
}

.value-display {
    color: var(--primary);
    font-weight: 700;
}

/* Type Selector */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.type-btn {
    padding: 1rem;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.type-btn:hover {
    background: var(--gray-200);
}

.type-btn.active {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-color: var(--primary);
}

.type-icon {
    font-size: 1.5rem;
}

.type-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Input */
.qr-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.qr-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-hint {
    font-size: 0.813rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-action {
    flex: 1;
    padding: 0.75rem;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--gray-200);
}

/* Customization Section */
.customization-section {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.toggle-btn.open {
    transform: rotate(180deg);
}

.customize-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.customize-content.open {
    max-height: 1000px;
}

/* Slider */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

/* Color Picker */
.color-picker-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 40px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
}

.color-input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.btn-preset {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-preset:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Select */
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* QR Preview */
.qr-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    padding: 2rem;
}

.qr-placeholder {
    text-align: center;
    color: var(--gray-600);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#qrCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* QR Info */
.qr-info {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 80px;
    font-weight: 600;
    color: var(--gray-700);
}

.info-value {
    flex: 1;
    color: var(--gray-900);
}

.info-value-truncate {
    flex: 1;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Download Section */
.download-section,
.share-section {
    margin-top: 1.5rem;
}

.download-section h3,
.share-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-download {
    width: 100%;
    padding: 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-download-svg {
    background: var(--primary);
}

.btn-download-svg:hover {
    background: var(--primary-dark);
}

.share-hint {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--gray-600);
}

/* Use Cases */
.use-cases-section {
    padding: 4rem 0;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.use-case-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.use-case-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.use-case-card p {
    color: var(--gray-600);
    font-size: 0.938rem;
}

/* FAQ */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.faq-item h3 {
    color: var(--primary);
    font-size: 1.063rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--gray-700);
    line-height: 1.7;
}

/* CTA */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-cta-primary {
    background: white;
    color: var(--primary);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .container {
        padding: 0 1rem;
    }
}