
/* Static Background Gradient — replaces animated orbs for performance */
body {
    background:
        radial-gradient(ellipse at 10% 15%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 88% 85%, rgba(236, 72, 153, 0.10) 0%, transparent 50%),
        #0a0820;
    background-attachment: fixed;
}


.app-container {
    max-width: 1200px;
    margin: 0 auto;
    /* Horizontal/bottom padding for desktop breathing room. */
    /* padding-top is carefully set to just clear the 56px fixed top-bar */
    padding: 0 1.5rem 1.5rem 1.5rem;
    padding-top: 64px; 
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden; /* Prevents app container from scrolling natively */
    display: flex;
    flex-direction: column;
    /* min-height: 100vh; */

    /* ── Unified spacing token used by all view section grids ── */
    --card-gap: 1.25rem;
}

/* Header */
.top-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
    text-align: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.logo i {
    -webkit-text-fill-color: #6366f1;
    font-size: 1.7rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(239, 68, 68, 0.2));
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #fdba74;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.75rem;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
    animation: fadeIn 0.5s ease-out forwards;
}

.streak-badge i {
    color: #f97316;
}

/* Header Icon Buttons */
.header-icon-group {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.75rem;
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.header-icon-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.header-icon-label {
    position: absolute;
    bottom: -15px;
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    text-transform: uppercase;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-icon-btn:hover i {
    transform: translateY(-8px);
}

.header-icon-btn:hover .header-icon-label {
    opacity: 1;
    bottom: 5px;
}

/* Specific styling for the Install PWA Button */
.install-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
    -webkit-text-fill-color: #4ade80;
    font-weight: 600;
}

.install-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.1));
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.install-btn i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}
.install-btn:hover i {
    animation: none; /* Stop bounce on hover since CSS transitions take over */
}

/* Skeleton Loaders for AI */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.skeleton-block {
    height: 1.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.skeleton-block.title {
    width: 40%;
    height: 2rem;
    margin-bottom: 0.5rem;
}

.skeleton-block.p1 { width: 90%; }
.skeleton-block.p2 { width: 80%; }
.skeleton-block.p3 { width: 95%; height: 4rem; margin-top: 0.5rem; }


/* Main Layout — used by dashboard and hour log views */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--card-gap, 1.25rem);
}

/* CRITICAL MOBILE FIX: Prevent CSS Grid blowout. 
   Grid items default to min-width: auto and will stretch if children overflow (like scrolling chips). */
/* View Sections */
.view-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-section.active {
    display: block; /* Grid is default for main-content, but block works for simple containers */
    opacity: 1;
    animation: fadeIn 0.4s ease-out;
}

/* Ensure Pomodoro View behaves like a full page */
.pomodoro-view {
    min-height: 80vh;
    width: 100%;
}

/* Keyframe for simple fade */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content > *,
.view-section > * {
    min-width: 0;
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Solid Panels — no backdrop-filter for GPU performance */
.glass-panel {
    background: rgba(22, 18, 54, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    contain: layout style;
}

.glass-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* For browser styling overrides */
::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Select options dropdown background */
option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--accent-glow);
}

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

