/* ==========================================
   LoFi Focus Timer - Custom Styles
   ========================================== */

:root {
    --primary: #2d2d3f;
    --secondary: #1a1a2e;
    --accent: #ff6b9d;
    --accent-secondary: #c75fef;
    --light: #fef6fb;
    --success: #4ecdc4;
    --peach: #ffa07a;
}

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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d3f 50%, #3d2e4f 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--light);
    overflow-x: hidden;
}

/* ==========================================
   Navigation
   ========================================== */

nav {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(255, 107, 157, 0.1);
}

nav .brand-logo {
    left: 15px;
    transform: none;
    line-height: 64px;
}

nav ul a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
}

nav ul a i {
    line-height: normal;
}

/* ==========================================
   Container
   ========================================== */

.container {
    max-width: 900px;
    padding: 20px;
}

/* ==========================================
   Timer Circle
   ========================================== */

.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.circle-timer {
    position: relative;
    width: 280px;
    height: 280px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 15px rgba(255, 107, 157, 0.5));
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-text {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0;
}

.timer-label {
    font-size: 0.9rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* ==========================================
   Control Buttons
   ========================================== */

.controls {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn-floating.btn-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}

.btn-floating.btn-large:hover {
    background: linear-gradient(135deg, #ff7eb3 0%, #d87ff9 100%);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6);
    transform: translateY(-2px);
}

.btn-floating.btn-large i {
    line-height: 60px;
    font-size: 2rem;
}

/* ==========================================
   Statistics Cards
   ========================================== */

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 300;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* ==========================================
   Task Section
   ========================================== */

.task-section {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0.9;
}

.task-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.task-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    color: var(--light);
    padding: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.task-input:focus {
    background: rgba(255,255,255,0.15);
    border-bottom-color: var(--accent);
    box-shadow: none;
    outline: none;
}

.task-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.btn-add-task {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 3px 15px rgba(255, 107, 157, 0.4);
    border-radius: 8px;
}

.btn-add-task:hover {
    background: linear-gradient(135deg, #ff7eb3 0%, #d87ff9 100%);
}

/* ==========================================
   Task List
   ========================================== */

.task-list {
    list-style: none;
    padding: 0;
}

.task-item {
    background: rgba(255,255,255,0.08);
    padding: 15px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(5px);
}

.task-item.completed {
    opacity: 0.6;
    background: rgba(78, 205, 196, 0.1);
}

.task-item.completed .task-name {
    text-decoration: line-through;
}

.task-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.task-meta {
    font-size: 0.85rem;
    opacity: 0.6;
    display: flex;
    gap: 15px;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-small {
    padding: 0 12px;
    height: 32px;
    line-height: 32px;
}

.btn-complete {
    background: var(--success);
}

.btn-delete {
    background: transparent;
    color: rgba(255,255,255,0.5);
    box-shadow: none;
}

.btn-delete:hover {
    background: var(--accent);
    color: white;
}

/* ==========================================
   Empty State
   ========================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.5;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* ==========================================
   Mobile Sidenav
   ========================================== */

.sidenav-trigger {
    display: flex;
    align-items: center;
    height: 64px;
}

.sidenav {
    background: var(--secondary);
}

.sidenav li > a {
    color: var(--light);
}

.sidenav li > a > i {
    margin-right: 15px;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 600px) {
    .brand-logo {
        font-size: 1.5rem;
    }
    
    .circle-timer {
        width: 220px;
        height: 220px;
    }
    
    .circle-timer svg {
        width: 220px;
        height: 220px;
    }
    
    .timer-text {
        font-size: 2.5rem;
    }
    
    .timer-label {
        font-size: 0.75rem;
    }
    
    .controls {
        gap: 10px;
    }
    
    .btn-floating.btn-large {
        width: 50px;
        height: 50px;
    }
    
    .btn-floating.btn-large i {
        line-height: 50px;
        font-size: 1.5rem;
    }
    
    .stats-container {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px 8px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .task-section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .container {
        padding: 10px;
    }
}

@media (max-width: 400px) {
    .circle-timer,
    .circle-timer svg {
        width: 200px;
        height: 200px;
    }

    .timer-text {
        font-size: 2.2rem;
    }
}

/* ==========================================
   Online/Offline Status Indicator
   ========================================== */

.online-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    margin-top: 26px;
    position: relative;
    transition: all 0.3s ease;
}

.online-indicator.online {
    background-color: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.online-indicator.online::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #4caf50;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

.online-indicator.offline {
    background-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}