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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header Stack */
.header-stack {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(
        135deg,
        rgba(42, 42, 42, 0.6) 0%,
        rgba(26, 26, 26, 0.8) 100%
    );
    border-radius: 16px;
    border: 1px solid #3a3a3a;
    position: relative;
    overflow: hidden;
}

.header-stack::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 30% 50%,
            rgba(96, 165, 250, 0.08) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 70% 50%,
            rgba(34, 197, 94, 0.08) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.header-stack p {
    position: relative;
    z-index: 1;
    color: #9ca3af;
    font-size: 0.95rem;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-stack img {
    height: 28px;
    vertical-align: middle;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.header-stack img:hover {
    filter: brightness(1.1);
}

.header-stack .invert-filter {
    filter: invert(1) brightness(0.9);
}

.header-stack .invert-filter:hover {
    filter: invert(1) brightness(1.1);
}

/* QR Generator Card */
.qr-generator {
    background: rgba(42, 42, 42, 0.4);
    border-radius: 16px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.qr-generator:hover {
    border-color: #4a4a4a;
}

.qr-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1f1f1f 100%);
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    gap: 16px;
}

.qr-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.qr-header-text h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 2px;
}

.qr-header-text span {
    font-size: 0.85rem;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-bar {
    padding: 10px 28px;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.85rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.qr-body {
    padding: 28px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(26, 26, 26, 0.5);
    padding: 4px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    font-weight: 500;
}

.tab-btn i {
    margin-right: 6px;
}

/* Tab Panes - Compatible avec Bootstrap .fade.show */
.tab-pane {
    animation: fadeIn 0.3s ease;
}

.tab-content {
    margin-top: 24px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.input-field {
    flex: 1;
    min-width: 200px;
}

.input-field label {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field input[type="text"],
.input-field select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-field input[type="text"]:focus,
.input-field select:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(26, 26, 26, 1);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.input-field input::placeholder {
    color: #6b7280;
}

/* Options Grid */
.options-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #3a3a3a;
}

.options-title {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.option-card {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #4a4a4a;
    background: rgba(26, 26, 26, 0.8);
}

.option-card label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-card select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

.option-card select:focus {
    outline: none;
    border-color: #60a5fa;
}

/* Color Pickers */
.color-options {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.color-picker:hover {
    border-color: #4a4a4a;
}

.color-picker span {
    font-size: 0.85rem;
    color: #9ca3af;
}

.color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker input[type="color"]::-webkit-color-swatch {
    border: 2px solid #4a4a4a;
    border-radius: 6px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: #4a4a4a;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #60a5fa;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Actions */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border: none;
    color: #ffffff;
    flex: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.3);
}

.btn-secondary {
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: rgba(60, 60, 60, 0.6);
    border-color: #4a4a4a;
}

/* QR Preview */
.qr-preview {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #3a3a3a;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.preview-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.preview-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #60a5fa, #22c55e);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.5;
}

.preview-placeholder {
    min-width: 150px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.preview-placeholder svg,
.preview-placeholder img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Loader */
.loader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: #9ca3af;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #3a3a3a;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.skeleton {
    height: 300px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* WiFi specific */
.wifi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-field {
    display: flex;
    align-items: flex-end;
}

.checkbox-field .checkbox-item {
    margin-bottom: 0;
    height: fit-content;
}

@media (max-width: 600px) {
    .wifi-grid {
        grid-template-columns: 1fr;
    }

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

    .color-options {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}
