/* assets/css/style.css */
:root {
    --bg-main: #0f1016;
    --bg-panel: #171821;
    --bg-input: #232533;
    
    --text-main: #ffffff;
    --text-muted: #8b8d9b;
    
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    
    --border-color: #2e303e;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 4px 30px rgba(99, 102, 241, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #a5a6b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Typography */
h2, h3 {
    font-weight: 600;
    letter-spacing: -0.5px;
}
.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Main Grid Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 800px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.panel {
    background-color: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

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

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
input[type="url"],
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
}
input[type="url"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 100%;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
input[type="color"]::-webkit-color-swatch { border-radius: 4px; border: none; }

/* Buttons */
.btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-glow);
}
.btn-secondary {
    background-color: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: #2a2c3d;
}
.btn-outline {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}
.btn-outline.active {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}
.btn-full {
    width: 100%;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form layouts */
.type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
}
.type-selector .btn {
    flex: 1;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* Edit Modal specific */
#edit-modal .modal-content {
  border-top: 4px solid var(--accent-primary);
}

/* Preview Area */
.preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}
.qr-render-area {
    background: var(--bg-main);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
    width: 256px;
    height: 256px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Dashboard List */
.dashboard-area {
    margin-top: 2rem;
}
.dashboard-area h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.qr-item {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.qr-item-info strong {
    display: block;
    margin-bottom: 0.25rem;
}
.qr-item-info small {
    color: var(--text-muted);
    font-family: monospace;
}
.qr-actions {
    display: flex;
    gap: 0.5rem;
}

/* FAQ Accordion */
.faq-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}
.faq-header {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.faq-question:hover {
    background-color: var(--bg-input);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    transition: all 0.3s ease;
    color: var(--text-muted);
    line-height: 1.6;
}
.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}
.faq-item.active .faq-question .icon {
    transform: rotate(45deg);
}
.faq-question .icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal-content {
    background: var(--bg-panel);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: var(--shadow-glow);
}
.modal-content h2 { margin-bottom: 1rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.5; font-size: 0.95rem; }
.close-btn {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Ad Layout */
.ad-space {
    margin-top: 2rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.ad-placeholder {
    width: 100%;
    height: 150px;
    background: #2a2c3d;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

/* FAQ Accordion */
.faq-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.faq-header {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question:hover {
    background: var(--bg-input);
}
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
    line-height: 1.6;
}
.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-height: 300px;
}
.faq-item.active .icon {
    transform: rotate(45deg);
}
.icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}
