/* =========================================
   Base Variables & Setup
========================================= */
:root {
    --primary-color: #e6edf3;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --glass-bg: rgba(22, 27, 34, 0.9);   /* GitHub dark panel */
    --glass-border: rgba(48, 54, 61, 0.9);
    --input-border: rgba(48, 54, 61, 0.9);
    --input-focus: #58a6ff;
    --error-color: #ff6b6b;
    --success-color: #39d353;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--text-main);
    min-height: 100vh;
}

/* Background for Login/Register */
.auth-body {
    background-image: url('../imgs/bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   Animations
========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Layout Containers
========================================= */
.page-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* =========================================
   Glassmorphism Panel
========================================= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Apply Fluid Animation */
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-panel h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

/* =========================================
   Forms & Inputs
========================================= */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 400;
}

.form-control {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--input-border);
    padding: 10px 0;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-bottom: 1px solid var(--input-focus);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.password-toggle {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    outline: none;
}

.password-toggle:hover {
    color: var(--text-main);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   Buttons
========================================= */
.btn-primary {
    width: 100%;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* =========================================
   Links & Extras
========================================= */
.auth-links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

.auth-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--text-main);
}

/* Messages */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.4s ease forwards;
}

.alert-success {
    background: rgba(81, 207, 102, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.alert-error ul {
    margin-left: 20px;
}

/* =========================================
   App Shell & Bottom Navigation
========================================= */
.app-body {
    background-color: #0d1117; /* Deep dark like GitHub/VS Code dark */
    display: block;
    padding-bottom: 90px;
}

.app-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Active State Indicator */
.nav-links li.active a {
    color: var(--primary-color);
}

.nav-links li.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background-color: #5c5cff; /* Accent color for the active line */
    border-radius: 3px;
    animation: slideUpLine 0.3s ease forwards;
}

@keyframes slideUpLine {
    from {
        opacity: 0;
        transform: translate(-50%, 5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* =========================================
   Activity Graph (GitHub Style)
========================================= */
.activity-graph-container {
    overflow-x: auto;
    margin-bottom: 30px;
    scrollbar-width: none; /* Hide scrollbar but keep scroll functionality */
}
.activity-graph-container::-webkit-scrollbar { height: 5px; }
.activity-graph-container::-webkit-scrollbar-thumb {
    background-color: #30363d;
    border-radius: 3px;
}

/* Month labels row */
.activity-month-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    min-width: max-content;
}
.activity-day-spacer {
    width: 32px;
    flex-shrink: 0;
}
.activity-month-cell {
    width: 14px;
    margin: 0 2px;
    font-size: 10px;
    color: #8b949e;
    text-align: left;
    white-space: nowrap;
}

/* Grid + Day Labels wrapper */
.activity-grid-wrap {
    display: flex;
    gap: 6px;
    min-width: max-content;
}

/* Day labels (Mon, Wed, Fri) */
.activity-day-labels {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 26px;
    flex-shrink: 0;
}
.activity-day-labels div {
    height: 14px;
    font-size: 10px;
    color: #8b949e;
    line-height: 14px;
    text-align: right;
    padding-right: 4px;
}

/* The actual grid */
.activity-graph {
    display: flex;
    gap: 3px;
    min-width: max-content; /* Prevent flex from compressing columns */
}
.activity-column {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0; /* Never compress individual columns */
}

.activity-box {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    transition: opacity 0.2s, transform 0.15s;
    cursor: default;
}
.activity-box:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.activity-inactive {
    background-color: #161b22;
    border: 1px solid #21262d;
}
.activity-active {
    background-color: #39d353;
    box-shadow: 0 0 6px rgba(57, 211, 83, 0.4);
}
.activity-future {
    background-color: #0d1117; /* Very dark - same as page bg, visually "off" */
    border: 1px solid #1a1f27;
}
