:root {
    --color-primary: #3498db;
    --color-secondary: #9b59b6;
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    --color-info: #1abc9c;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-focus: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --gradient-break: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --timer-shadow: 0 10px 40px rgba(52, 152, 219, 0.3);
}

/* Icon Circle */
.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.icon-circle i {
    font-size: 2.5rem;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    }
}

/* Timer Section */
.timer-section {
    padding: 2rem 0;
}

/* Mode Display */
.mode-display {
    margin-bottom: 1.5rem;
}

.mode-badge {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gradient-focus);
    color: white;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    animation: fadeIn 0.5s ease;
}

.mode-badge.break {
    background: var(--gradient-break);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* Timer Circle */
.timer-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
}

.timer-circle {
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(52, 152, 219, 0.1);
    stroke-width: 8;
}

.timer-circle-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 848;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

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

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

.timer-session {
    font-size: 1rem;
    color: var(--color-secondary);
    font-weight: 600;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-timer {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-timer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.btn-timer-primary {
    background: var(--gradient-focus);
    color: white;
}

.btn-timer-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    color: white;
}

.btn-timer-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-timer-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
}

.btn-timer-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-timer-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #5d6d6e 100%);
    color: white;
}

.btn-timer-info {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
}

.btn-timer-info:hover {
    background: linear-gradient(135deg, #16a085 0%, #138871 100%);
    color: white;
}

/* Settings Section */
.settings-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.settings-section h5 {
    color: var(--color-primary);
    font-weight: 700;
}

.settings-section .form-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.settings-section .form-control {
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 0.625rem;
    transition: all 0.3s ease;
}

.settings-section .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* Statistics Section */
.stats-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stats-section h5 {
    color: var(--color-primary);
    font-weight: 700;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #777;
    font-weight: 500;
}

/* Feature Box */
.feature-box {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.feature-box h5 {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.feature-box p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Benefits List */
.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: #555;
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.benefits-list li:last-child {
    border-bottom: none;
}

/* Accordion Customization */
.accordion-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(52, 152, 219, 0.2);
    margin-bottom: 0.75rem;
    border-radius: 10px !important;
    overflow: hidden;
}

.accordion-button {
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    border: none;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    background: rgba(52, 152, 219, 0.1);
    color: var(--color-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-button::after {
    filter: hue-rotate(180deg);
}

.accordion-body {
    padding: 1.25rem;
    color: #555;
    line-height: 1.7;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .timer-circle-container {
        width: 250px;
        height: 250px;
    }
    
    .timer-circle {
        width: 250px;
        height: 250px;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .settings-section,
    .stats-section {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .icon-circle i {
        font-size: 2rem;
    }
    
    .timer-circle-container {
        width: 220px;
        height: 220px;
    }
    
    .timer-circle {
        width: 220px;
        height: 220px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .timer-session {
        font-size: 0.9rem;
    }
    
    .mode-badge {
        font-size: 1rem;
        padding: 0.625rem 1.5rem;
    }
    
    .btn-timer {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .timer-controls {
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Notification Permission Banner */
.notification-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.5s ease;
}

.notification-banner i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.notification-banner button {
    background: white;
    color: var(--color-primary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .chart-container {
        max-width: 100%;
        overflow-x: hidden;
        padding: 0.5rem;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 100%;
        font-size: 0.875rem;
    }
    
    .form-control, .form-select, .btn {
        width: 100% !important;
        max-width: 100%;
    }
    
    .display-4 { font-size: 2rem; }
    .lead { font-size: 1rem; }
    .card-body { padding: 1rem !important; }
}
