:root {
    --bg-color: #09090b;
    /* Zinc 950 */
    --surface-color: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    /* Blue 500 */
    --primary-hover: #2563eb;
    /* Blue 600 */
    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    /* Zinc 400 */
    --accent: #0ea5e9;
    /* Sky 500 */
    --success: #10b981;
    --glass-blur: blur(16px);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.glass-card {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.loader-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--surface-color);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Auth / Landing Page Styles */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #6366f1, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: white;
    font-family: inherit;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Customization Styles */
.reg-header-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 1.5rem 1.5rem 0 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.custom-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.reg-audio-player {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.reg-audio-player audio {
    width: 100%;
    max-width: 300px;
    height: 35px;
    filter: invert(100%) hue-rotate(180deg) brightness(1.5);
    /* Make it look better in dark theme */
}

/* Builder Styles */
.builder-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 2rem;
    height: calc(100vh - 120px);
    margin-top: 1rem;
}

.builder-sidebar,
.builder-properties {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.builder-canvas-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.builder-canvas-wrapper:has(.drag-over) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.builder-canvas {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.draggable-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: grab;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.draggable-item:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.draggable-item:active {
    cursor: grabbing;
}

.canvas-element {
    position: relative;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.canvas-element.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.canvas-element .element-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    gap: 0.25rem;
}

.canvas-element:hover .element-actions {
    display: flex;
}

.action-btn {
    padding: 0.25rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-dim);
    cursor: pointer;
}

.action-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.drop-indicator {
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 0.25rem 0;
    display: none;
}

.builder-canvas.drag-over .drop-indicator {
    display: block;
}

/* Custom Background for Builder Preview */
.builder-canvas-wrapper.has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    border-radius: 1.5rem;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar-item:hover,
.sidebar-item.active {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar-icon {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

/* Dashboard Content */
.dashboard-content {
    padding: 2rem;
    overflow-y: auto;
}

.event-header {
    background: linear-gradient(to right, #1e293b, #0f172a);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.status-badge {
    background: #4cc9f0;
    color: #100b32;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grid Layouts */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.widgets-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.qa-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.qa-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateX(2px);
}

/* Charts */
.chart-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 1.5rem;
    position: relative;
}

.chart-bar {
    width: 100%;
    margin: 0 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5) 0%, rgba(99, 102, 241, 0) 100%);
    border-top: 2px solid var(--primary);
    border-radius: 2px 2px 0 0;
    transition: height 1s ease-out;
}

.chart-line-path {
    fill: none;
    stroke: #4cc9f0;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 6px rgba(76, 201, 240, 0.3));
}

.chart-area-fill {
    fill: url(#chartGradient);
    opacity: 0.3;
}

.donut-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0% 82%, var(--surface-color) 82% 100%);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--bg-color);
    /* Match card bg */
    border-radius: 50%;
}

.donut-inner-text {
    position: absolute;
    z-index: 10;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Numbers Grid */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.number-item {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    opacity: 0.8;
}

.number-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.2rem;
    color: white;
}