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

body {
    font-family: 'Arial', sans-serif;
    background-color: #F9FAFB;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #111;
    margin: 0;
}

.auth-controls {
    display: flex;
    gap: 1rem;
}

.auth-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #000;
    color: #fff;
}

.auth-button:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-button.logout {
    background-color: #dc3545;
}

.auth-button.logout:hover {
    background-color: #c82333;
}

/* Main Content */
.habits-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.habit-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.habit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.habit-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #111;
    margin: 0;
}

.log-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #28a745;
    color: white;
    min-width: 120px;
}

.log-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Year Display */
.year-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.month-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.month-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.month-label {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.8rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    justify-items: center;
}

.day-square {
    width: 18px;
    height: 18px;
    background-color: #e9ecef;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.day-square:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.day-square.completed {
    background-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.day-square.completed:hover {
    background-color: #218838;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.back-link:hover {
    color: #000;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .habit-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .year-display {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .month-card {
        padding: 1rem;
    }
    
    .day-square {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .habit-title {
        font-size: 1.5rem;
    }
    
    .year-display {
        grid-template-columns: 1fr;
    }
    
    .day-square {
        width: 14px;
        height: 14px;
    }
}