/* ==========================================
   WIFI QR GENERATOR
   Unique Design System - Light Mode SaaS
   ========================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-lighter: #eef2ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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);
    --shadow-glow: 0 0 20px -5px var(--primary-light);
}

/* Container */
.wqr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
}

/* Hero Header */
.wqr-hero {
    position: relative;
    padding: 80px 24px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--white) 50%, var(--gray-50) 100%);
}

.wqr-hero-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--primary-light) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, #c7d2fe 0%, transparent 50%);
    opacity: 0.6;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.4; }
}

.wqr-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.wqr-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-light);
}

.wqr-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.wqr-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Interface Layout */
.wqr-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 48px 24px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

/* Panels */
.wqr-panel {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.wqr-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-100);
}

.wqr-panel-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wqr-panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

/* Form Styles */
.wqr-form {
    padding: 32px;
}

.wqr-field {
    margin-bottom: 24px;
}

.wqr-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.wqr-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wqr-input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    opacity: 0.5;
    z-index: 2;
}

.wqr-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    transition: all 0.2s;
    font-family: inherit;
}

.wqr-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-lighter);
}

.wqr-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 4px;
}

.wqr-toggle-pw:hover {
    opacity: 1;
}

.wqr-field-hint {
    display: block;
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 6px;
}

.wqr-select-wrap {
    position: relative;
}

.wqr-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 12px center;
    background-size: 20px;
    padding-right: 48px;
}

.wqr-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-lighter);
}

/* Checkbox */
.wqr-options {
    margin-bottom: 24px;
}

.wqr-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: var(--gray-600);
}

.wqr-check {
    display: none;
}

.wqr-checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wqr-check:checked + .wqr-checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.wqr-check:checked + .wqr-checkmark::after {
    content: '✓';
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

/* Generate Button */
.wqr-generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px -4px var(--primary);
}

.wqr-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px var(--primary);
}

.wqr-btn-icon {
    font-size: 20px;
}

/* Output Panel */
.wqr-output-panel {
    display: none;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wqr-qr-container {
    padding: 32px;
    text-align: center;
}

.wqr-qr-frame {
    display: inline-block;
    position: relative;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

#wqr-code {
    width: 256px;
    height: 256px;
}

#wqr-code img {
    display: block;
    width: 100%;
    height: 100%;
}

.wqr-qr-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.wqr-network-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.wqr-info-item {
    text-align: center;
}

.wqr-info-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.wqr-info-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    font-family: 'Menlo', monospace;
}

/* Actions */
.wqr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 0 32px 32px;
}

.wqr-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.wqr-action-btn span:first-child {
    font-size: 24px;
}

.wqr-btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.wqr-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.wqr-btn-secondary {
    background: var(--gray-50);
    color: var(--gray-700);
    border-color: var(--gray-200);
}

.wqr-btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.wqr-share-hint {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    padding: 16px 24px;
    margin: 0 32px 32px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    text-align: center;
    border-left: 4px solid var(--primary);
}

/* Empty State */
.wqr-empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 32px;
    text-align: center;
    color: var(--gray-400);
}

.wqr-empty-illustration {
    position: relative;
    margin-bottom: 24px;
}

.wqr-wifi-icon {
    font-size: 64px;
    position: relative;
    z-index: 2;
}

.wqr-wifi-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.wqr-wifi-waves span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    opacity: 0;
    animation: wave 2s infinite;
}

.wqr-wifi-waves span:nth-child(2) { animation-delay: 0.5s; }
.wqr-wifi-waves span:nth-child(3) { animation-delay: 1s; }

@keyframes wave {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Sections */
.wqr-section {
    padding: 80px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.wqr-section:nth-child(even) {
    background: var(--gray-50);
}

.wqr-section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    text-align: center;
    margin: 0 0 48px;
}

/* Use Cases */
.wqr-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.wqr-case {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    transition: all 0.3s;
}

.wqr-case:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.wqr-case-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.wqr-case h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 12px;
}

.wqr-case p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0 0 16px;
}

.wqr-case-tag {
    display: inline-block;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

/* Steps Horizontal */
.wqr-steps-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    border-radius: var(--radius-xl);
    margin: 48px auto;
    max-width: 1000px;
}

.wqr-steps-section .wqr-section-title {
    color: var(--white);
}

.wqr-steps-h {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wqr-step-h {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.wqr-step-num {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.wqr-step-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--white);
}

.wqr-step-content p {
    font-size: 14px;
    color: var(--gray-400);
    margin: 0;
}

.wqr-step-arrow {
    font-size: 32px;
    color: var(--gray-600);
    font-weight: 300;
}

/* Content Article */
.wqr-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 24px;
}

.wqr-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 64px 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary-light);
}

.wqr-content h2:first-child {
    margin-top: 0;
}

.wqr-content p {
    font-size: 18px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.wqr-content code {
    background: var(--gray-100);
    color: var(--primary-dark);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Menlo', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

/* Benefits Grid */
.wqr-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.wqr-benefit {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.wqr-benefit-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-lighter);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.wqr-benefit h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.wqr-benefit p {
    font-size: 15px;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.6;
}

/* Table */
.wqr-table-wrap {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.wqr-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 15px;
}

.wqr-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 700;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gray-200);
}

.wqr-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.wqr-table tr:hover td {
    background: var(--gray-50);
}

/* Code Example */
.wqr-code-example {
    background: var(--gray-900);
    color: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    overflow-x: auto;
}

.wqr-code-example code {
    background: none;
    color: #a5b4fc;
    font-size: 15px;
    display: block;
    margin-bottom: 16px;
}

.wqr-code-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: var(--gray-400);
}

.wqr-code-breakdown li {
    margin-bottom: 8px;
    padding-left: 16px;
    border-left: 2px solid var(--primary);
}

.wqr-code-breakdown strong {
    color: #fcd34d;
}

/* Security Tips */
.wqr-security-tips {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.wqr-tip-good, .wqr-tip-bad {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.wqr-tip-good {
    border-left: 4px solid var(--success);
}

.wqr-tip-bad {
    border-left: 4px solid var(--danger);
}

.wqr-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.wqr-tip-good .wqr-tip-icon {
    color: var(--success);
}

.wqr-tip-bad .wqr-tip-icon {
    color: var(--danger);
}

.wqr-security-tips h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 4px;
}

.wqr-security-tips p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
}

/* List Styled */
.wqr-list-styled {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.wqr-list-styled li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.7;
}

.wqr-list-styled li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    width: 24px;
    height: 24px;
    background: var(--primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* FAQ Modern */
.wqr-faq-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.wqr-faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.wqr-faq-item h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    padding: 20px 24px;
    margin: 0;
    background: var(--gray-50);
    cursor: pointer;
    transition: background 0.2s;
}

.wqr-faq-item h4:hover {
    background: var(--gray-100);
}

.wqr-faq-item p {
    font-size: 16px;
    color: var(--gray-600);
    padding: 20px 24px;
    margin: 0;
    border-top: 1px solid var(--gray-100);
    line-height: 1.7;
}

/* CTA Box */
.wqr-cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 64px;
}

.wqr-cta-box h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
}

.wqr-cta-box p {
    font-size: 18px;
    opacity: 0.9;
    margin: 0 0 24px;
    color: var(--white);
}

.wqr-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

.wqr-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.3);
}

/* Toast */
.wqr-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wqr-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Print Styles */
@media print {
    .wqr-hero, .wqr-section, .wqr-content, .wqr-actions, .wqr-share-hint {
        display: none !important;
    }
    
    .wqr-interface {
        display: block;
    }
    
    .wqr-input-panel {
        display: none !important;
    }
    
    .wqr-output-panel {
        display: block !important;
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .wqr-qr-frame {
        box-shadow: none;
        border: 2px solid #000;
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .wqr-interface {
        grid-template-columns: 1fr;
    }
    
    .wqr-title {
        font-size: 36px;
    }
    
    .wqr-actions {
        grid-template-columns: 1fr;
    }
    
    .wqr-steps-h {
        flex-direction: column;
    }
    
    .wqr-step-arrow {
        transform: rotate(90deg);
    }
    
    .wqr-benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .wqr-hero {
        padding: 48px 16px;
    }
    
    .wqr-title {
        font-size: 28px;
    }
    
    .wqr-card {
        padding: 24px;
    }
    
    .wqr-form {
        padding: 24px;
    }
    
    .wqr-actions {
        padding: 0 24px 24px;
    }
    
    .wqr-share-hint {
        margin: 0 24px 24px;
    }
}