/* ========================================================================
   ImaginiQR — Main Stylesheet
   Modern, responsive design inspired by imaginiqr.ro
   ======================================================================== */

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --accent: #fd79a8;
    --accent-dark: #e84393;
    --bg: #ffffff;
    --bg-alt: #f8f9ff;
    --bg-dark: #2d1b69;
    --text: #2d3436;
    --text-light: #636e72;
    --text-white: #ffffff;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --success: #00b894;
    --danger: #e17055;
    --warning: #fdcb6e;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --transition: 0.25s ease;
    --max-width: 1100px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

/* --- CONTAINER --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 0;
    transition: all var(--transition);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}
.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}
.nav-links a {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}
.nav-links a:hover {
    color: var(--primary);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.35);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(253,121,168,0.35);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-dark);
}
.btn-white:hover {
    background: #f0f0f0;
    color: var(--primary-dark);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

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

/* --- HERO --- */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff0f5 50%, #f8f9ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(253,121,168,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 16px auto 0;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-visual {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 160px;
    transition: transform var(--transition);
}
.hero-card:hover {
    transform: translateY(-4px);
}

.hero-card .icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.hero-card .label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.05rem;
    }
    .hero {
        padding: 110px 0 50px;
    }
}

/* --- SECTIONS --- */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-dark {
    background: var(--bg-dark);
    color: white;
}
.section-dark h2,
.section-dark h3 {
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-dark .section-header p {
    color: rgba(255,255,255,0.7);
}

/* --- STEPS --- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.step {
    text-align: center;
    padding: 32px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 16px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- FEATURES --- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}
.feature:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.feature-text p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- PRICING --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.03);
}

.pricing-card.popular:hover {
    transform: scale(1.03) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
}

.pricing-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.pricing-price small {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-light);
}
.pricing-features li:last-child {
    border-bottom: none;
}
.pricing-features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

/* --- FORM --- */
.event-form {
    max-width: 580px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition);
    background: white;
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

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

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .event-form {
        padding: 24px;
    }
}

/* --- SUCCESS STATE --- */
.success-box {
    display: none;
    text-align: center;
    padding: 32px;
    background: #f0fff4;
    border: 2px solid var(--success);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.success-box.visible {
    display: block;
}

.success-box h3 {
    color: var(--success);
    margin-bottom: 8px;
}

.success-details {
    background: white;
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: left;
    margin-top: 16px;
}

.success-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 8px;
}

.success-details .detail-row:last-child {
    border-bottom: none;
}

.copy-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--primary);
    transition: all var(--transition);
}
.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- QR CODE --- */
.qr-container {
    text-align: center;
    margin: 24px 0;
}

.qr-container canvas,
.qr-container img {
    display: inline-block;
    border: 8px solid white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* --- GALLERY --- */
.gallery-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    color: white;
    padding: 100px 0 40px;
    text-align: center;
}

.gallery-header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 4px;
}

.gallery-header p {
    color: rgba(255,255,255,0.8);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 40px 0;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--bg-alt);
    transition: transform var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: white;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    justify-content: space-between;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* --- CAMERA / UPLOAD --- */
.camera-section {
    text-align: center;
    padding: 40px 0;
}

.camera-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.camera-container video {
    width: 100%;
    display: block;
}

.camera-container canvas {
    display: none;
}

.camera-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    margin: 24px 0;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(108,92,231,0.04);
}

.upload-area .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1;
}

.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

.lightbox .download-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* --- ADMIN PANEL --- */
.admin-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    color: white;
    padding: 100px 0 40px;
}

.admin-header h1 {
    color: white;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* --- LOGIN --- */
.login-box {
    max-width: 400px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-box h2 {
    margin-bottom: 24px;
}

/* --- TOAST --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* --- FOOTER --- */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255,255,255,0.9);
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* --- COMPARISON TABLE --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--bg-alt);
    font-weight: 700;
}

.comparison-table tr td:first-child {
    text-align: left;
    font-weight: 500;
}

.check { color: var(--success); font-weight: 700; }
.cross { color: var(--danger); }
.warn  { color: var(--warning); }

/* --- FAQ --- */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
}

.faq-question {
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    color: var(--text-light);
    margin-top: 8px;
    display: none;
    font-size: 0.95rem;
}

.faq-item.open .faq-answer {
    display: block;
}

/* --- FLASH DISCOUNT --- */
.flash-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #e84393, #6c5ce7);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 999;
    font-weight: 600;
    flex-wrap: wrap;
}

.flash-banner .old-price {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.9rem;
}

.flash-banner .new-price {
    font-size: 1.5rem;
    font-weight: 800;
}

.flash-timer {
    font-size: 1.2rem;
    font-weight: 800;
}

.flash-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    position: absolute;
    right: 16px;
    top: 8px;
}

/* --- SPINNER --- */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

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

/* --- UTILITIES --- */
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
}
.error-msg.visible {
    display: block;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .nav-links { display: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.popular { transform: none; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .flash-banner { flex-direction: column; text-align: center; }
}
