/* QR Generator Specific Styles */

/* Hero Section */
.qr-hero {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.qr-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.qr-hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.qr-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qr-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.security-badge i {
    font-size: 1.1rem;
}

/* Generator Layout */
.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Panels */
.input-panel,
.output-panel {
    position: sticky;
    top: 6rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

/* Type Selector */
.type-selector {
    position: relative;
}

.type-select {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.type-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Input Sections */
.input-section {
    display: none;
    margin-bottom: 2rem;
}

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

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

.input-section input,
.input-section textarea,
.input-section select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    resize: vertical;
}

.input-section input:focus,
.input-section textarea:focus,
.input-section select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.input-section input::placeholder,
.input-section textarea::placeholder {
    color: var(--text-muted);
}

/* Form Layout */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-checkbox label {
    margin: 0;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Location Button */
.location-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--border-radius-small);
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.location-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

/* Generation Options */
.generation-options {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.generation-options h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.option-group {
    display: flex;
    flex-direction: column;
}

.option-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.option-group select {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-medium);
    margin-top: 2rem;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Output Actions */
.output-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover:not(:disabled) {
    background: var(--glass-border);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* QR Display */
.qr-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    margin-bottom: 2rem;
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
}

.qr-placeholder {
    text-align: center;
    color: var(--text-muted);
}

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

.qr-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

.qr-canvas {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-small);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* QR Info */
.qr-info {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.template-card {
    text-align: center;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-medium);
    position: relative;
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.template-icon {
    margin-bottom: 1rem;
}

.template-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.template-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.template-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.template-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--gradient-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-card {
    text-align: center;
    padding: 2rem;
}

.about-icon {
    margin-bottom: 1.5rem;
}

.about-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

.about-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Security Notice */
.security-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #ffc107;
}

.notice-header i {
    font-size: 1.2rem;
}

.notice-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.notice-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.notice-content p:last-child {
    margin-bottom: 0;
}

.notice-content strong {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 968px) {
    .generator-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .input-panel,
    .output-panel {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .output-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .qr-hero {
        padding: 6rem 0 3rem 0;
    }

    .security-badge {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

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

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

    .qr-display {
        min-height: 250px;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Animation for QR code generation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.qr-canvas.animate {
    animation: fadeInScale 0.5s ease-out;
}

/* Loading animation for generate button */
.generate-btn.loading {
    pointer-events: none;
}

.generate-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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