:root {
    /* Light Mode Colors */
    --bg-primary: #f5f7fb;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --border: #e2e8f0;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --ad-bg: #f8fafc;
    --ad-border: #cbd5e1;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #0b0f19;
    --bg-card: #151d30;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-light: #1e293b;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;
    --border: #1e293b;
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --ad-bg: #1e293b;
    --ad-border: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

header {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.theme-toggle {
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0.6rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--text-primary);
}
.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
@media (min-width: 992px) {
    .layout-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 2.25rem;
    transition: var(--transition);
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Tabs for QR Code Type */
.qr-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}
.qr-tab-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.qr-tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}
.qr-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Forms styling */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.checkbox-group input {
    width: 18px;
    height: 18px;
}

/* Customisation options */
.custom-options {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

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

/* Color input custom styling */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border);
    border-radius: 50%;
}

/* QR Code Preview Column */
.preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: sticky;
    top: 2rem;
}

.qr-preview-wrapper {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 250px;
    transition: var(--transition);
}

.qr-preview-wrapper img {
    max-width: 100%;
    height: auto;
}

.qr-placeholder-text {
    color: #64748b;
    font-size: 0.9rem;
}

.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn-secondary:hover {
    background: var(--border);
    box-shadow: none;
}

/* New Social Share Bar */
.share-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    align-self: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.share-buttons {
    display: flex;
    gap: 10px;
}
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}
.share-btn svg {
    width: 18px;
    height: 18px;
}
.share-btn.twitter-x {
    background: #1da1f2;
}
.share-btn.twitter-x:hover {
    background: #0c85d0;
    transform: scale(1.1);
}
.share-btn.facebook {
    background: #1877f2;
}
.share-btn.facebook:hover {
    background: #0d5ec4;
    transform: scale(1.1);
}
.share-btn.linkedin {
    background: #0a66c2;
}
.share-btn.linkedin:hover {
    background: #08519c;
    transform: scale(1.1);
}
.share-btn.whatsapp {
    background: #25d366;
}
.share-btn.whatsapp:hover {
    background: #1ebd56;
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.footer-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.current-time-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-primary);
}
[data-theme="light"] .current-time-badge {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 8px;
    transition: var(--transition);
}
.footer-link:hover {
    color: var(--primary);
}

/* Alert notifications */
.alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
