:root {
    /* Color Palette - Premium Dark/Glass */
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    --accent-color: #ec4899;
    /* Pink 500 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success-color: #10b981;
    --danger-color: #ef4444;

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Effects */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(12px);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Fixed background to prevent mobile scroll glitches and repeating */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    pointer-events: none;
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.card {
    background: var(--surface-color);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--glass-shadow);
}

.input-group {
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.input-field {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--surface-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow-y: auto !important;
    }

    aside {
        border-right: none;
        border-bottom: var(--glass-border);
        padding: var(--spacing-md) !important;
    }

    main {
        padding: var(--spacing-md) !important;
    }

    .auth-container {
        padding: var(--spacing-md);
    }

    .card {
        padding: var(--spacing-md);
    }
}

/* Sticky Notes Container */
#sticky-notes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

/* Base Sticky Note Style */
.sticky-note {
    position: absolute;
    width: 200px;
    min-height: 200px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    transition: box-shadow 0.2s, transform 0.2s;
    z-index: 20;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

    /* Transform is handled by inline style for rotation */
}

.sticky-note-header {
    height: 30px;
    background: rgba(0, 0, 0, 0.05);
    cursor: grab;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 5px;
}

.sticky-note-content {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    padding: 10px;
    font-family: 'Kalam', cursive, sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

/* Sticky Notes Mobile Optimization */
@media (max-width: 768px) {
    #sticky-notes-container {
        position: relative;
        top: auto;
        left: auto;
        height: auto;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding-top: 2rem;
        pointer-events: auto;
        overflow: visible;
        z-index: 1;
    }

    .sticky-note {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        min-height: 180px !important;
        transform: none !important;
        margin-bottom: 0;
        animation: fadeIn 0.3s ease;
    }

    .sticky-note-header {
        cursor: default;
    }
}