/* ===================================== */
/* LIQUID GLASS DESIGN SYSTEM */
/* ===================================== */
:root {
    --tv-bg-primary: #050505;
    --tv-bg-secondary: #0d0d0d;
    --tv-bg-tertiary: #141414;
    --tv-border: rgba(255, 255, 255, 0.08);
    --tv-border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --tv-text-primary: #f0f0f0;
    --tv-text-secondary: #a0a0a0;
    --tv-text-tertiary: #606060;
    --tv-blue: #3b82f6;
    --tv-green: #10b981;
    --tv-red: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--tv-bg-primary);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--tv-text-primary);
    margin: 0;
    padding-top: 64px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Dashboard Layout */
.dashboard-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(13, 13, 13, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-icon {
    font-size: 24px;
    color: var(--tv-blue);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.5));
    animation: logo-satellite-rotate 8s ease-in-out infinite;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
}

.logo-dot {
    color: #3b82f6;
    margin: 0 4px 0 1px;
    font-weight: 900;
}

.live-text-modern {
    color: #ef4444;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
    animation: professional-breath 3s ease-in-out infinite;
    position: relative;
    top: 1.5px;
}

@keyframes professional-breath {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes logo-satellite-rotate {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(15deg);
    }
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 64px;
    background: rgba(5, 5, 5, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 900;
    transition: left 0.3s ease;
}

.main-content {
    margin-left: 260px;
    padding-top: 24px;
    flex: 1;
    width: calc(100% - 260px);
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Liquid Glass Card */
.liquid-glass-card {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    z-index: 1;
}

.liquid-glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }

    .dashboard-sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-bar {
        left: 0;
        width: 100%;
    }
}

/* Active Nav state */
.active-nav-item {
    border-right: 3px solid #6366f1 !important;
}

/* Modal Base Styles */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.auth-modal-box {
    background: linear-gradient(145deg, #0f1117, #1a1d2e);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-input {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.auth-input:focus {
    border-color: #6366f1 !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Fix for number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Fix for datetime-local icons and appearance */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

/* Fix for Select Dropdowns White on White */
select.auth-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select.auth-input option {
    background: #0f1117;
    color: white;
}

.premium-required-overlay {
    background: radial-gradient(circle at center, rgba(13, 15, 24, 0.95) 0%, #050505 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Custom Scrollbar for Nav */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Auth Spinner */
.auth-spinner {
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

.liquid-glass-card:hover .journal-delete-btn {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.journal-delete-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.journal-delete-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Custom Input Modal */
#customInputModal .auth-modal-box {
    max-width: 400px;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.05) 0%, transparent 60%), #0f1117;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#customInputModal.show {
    opacity: 1;
    pointer-events: auto;
}

#customInputModal.show .auth-modal-box {
    transform: scale(1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 50px rgba(99, 102, 241, 0.1);
}