/* Existing styles */
body {
    font-family: 'Montserrat', sans-serif;
}
/* Goal progress shared styles (daily + weekly) */
.goal-progress {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.goal-bar {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}
.goal-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    transition: width 0.4s ease;
}
.goal-text {
    font-size: 0.85em;
    color: #bdc3c7;
}
/* Badges */
.badges-section {
    margin-top: 24px;
    text-align: left;
}
.badges-section h4 {
    margin: 0 0 12px 0;
}
.badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
}
.badge-emoji {
    font-size: 1.2em;
}
.badge-text {
    color: #ecf0f1;
    font-size: 0.95em;
}
body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); /* Gradient bakgrund */
    color: #ecf0f1; /* Ljusgrå/vit */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
    overflow-x: hidden; /* Förhindra horisontell scroll */
}

/* Main app container */
#pomodoro-app {
    background-color: rgba(52, 73, 94, 0.95);
    padding: 40px 30px 100px; /* Extra padding bottom för nav */
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Timer container */
#timer {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 20px auto 20px auto; /* Mindre margin och flyttad ner */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(52, 73, 94, 0.9) 20%, rgba(44, 62, 80, 0.6) 50%, rgba(44, 62, 80, 0.3) 70%, rgba(44, 62, 80, 0.1) 85%, transparent 100%);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(46, 204, 113, 0.15),
        0 0 40px rgba(46, 204, 113, 0.08);
    padding: 30px; /* Mindre padding för kompaktare design */
}

/* Progress ring SVG */
#progress-ring {
    position: absolute;
    top: 30px;
    left: 30px;
    width: calc(100% - 60px);
    height: calc(100% - 60px);
    transform: rotate(-90deg);
}

.progress-ring__background {
    stroke: rgba(127, 140, 141, 0.3);
    stroke-width: 8;
}

.progress-ring__circle {
    stroke: #2ecc71;
    stroke-width: 8;
    stroke-linecap: round;
    fill: none;
    transition: stroke-dashoffset 0.5s ease-in-out;
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.5));
}

/* Pulseffekt för progress ring när timer är aktiv */
.progress-ring__circle.active {
    animation: pulse-ring-animation 2s ease-in-out infinite;
}

/* Timer content - centrerat över SVG */
#timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: #ecf0f1;
}

#status {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #bdc3c7;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Current task display in timer */
.current-task-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 16px;
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 20px;
    font-size: 0.9em;
    color: #3498db;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-task-info .task-icon {
    font-size: 1.1em;
}

#time-display {
    font-size: 3.5em;
    font-weight: bold;
    color: #ecf0f1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: 'Montserrat', monospace;
}

/* Controls */
#controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

#controls button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#start-btn {
    background-color: #2ecc71;
    color: white;
}

#start-btn:hover:not(:disabled) {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

#pause-btn {
    background-color: #f39c12;
    color: white;
}

#pause-btn:hover:not(:disabled) {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

#reset-btn {
    background-color: #e74c3c;
    color: white;
}

#reset-btn:hover:not(:disabled) {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

#controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.app-section {
    display: none;
}

.app-section.active-section {
    display: block;
}

/* Settings toggle button */
#settings-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex !important; /* Force display */
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 5px;
    pointer-events: auto !important; /* Ensure it's clickable */
}

#settings-toggle-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #ecf0f1;
    border-radius: 1px;
    transition: all 0.3s ease;
}

#settings-toggle-btn:hover span {
    background-color: #2ecc71;
}

/* Settings panel */
#settings-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Hidden by default */
    width: 350px;
    height: 100vh;
    background-color: #2c3e50;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    z-index: 1500;
    overflow-y: auto;
    transition: right 0.3s ease;
}

#settings-panel.open {
    right: 0; /* Show panel when open */
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #34495e;
    background-color: #34495e;
}

.settings-header h2 {
    margin: 0;
    color: #ecf0f1;
}

#close-settings-btn {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

#close-settings-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.settings-content {
    padding: 20px;
}

.settings-content > div {
    margin-bottom: 15px;
}

.settings-content label {
    display: block;
    margin-bottom: 5px;
    color: #bdc3c7;
    font-weight: bold;
}

.settings-content input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #4a5f70;
    border-radius: 5px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 1em;
    box-sizing: border-box;
}

.settings-subheader {
    color: #2ecc71;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
    border-bottom: 1px solid #34495e;
    padding-bottom: 5px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.notification-settings,
.notification-frequency {
    margin-bottom: 15px;
}

.notification-frequency select {
    width: 100%;
    padding: 8px;
    border: 1px solid #4a5f70;
    border-radius: 5px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 1em;
    margin-top: 5px;
}

#save-settings-btn {
    width: 100%;
    padding: 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

#save-settings-btn:hover {
    background-color: #27ae60;
}

/* Insights Section */
.insights-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-section h4 {
    margin: 0 0 20px 0;
    color: #ecf0f1;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.insight-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.insight-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.insight-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.insight-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2ecc71;
    line-height: 1;
}

.insight-text {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-card {
        padding: 12px;
    }
    
    .insight-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .insight-value {
        font-size: 1.2rem;
    }
}

/* Modern Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 8px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    color: #ecf0f1;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-btn.active {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.15);
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 0 0 2px 2px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.nav-btn.active .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.5));
}

.nav-label {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.nav-btn:hover .nav-label {
    transform: scale(1.05);
}

/* Gamla tab-styling för att ta bort */
.app-tabs {
    display: none;
}

/* Avancerad uppgiftshantering */
.task-creator {
    background-color: rgba(52, 73, 94, 0.8);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-creator {
    background: rgba(52, 73, 94, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.task-creator h4 {
    margin: 0 0 20px 0;
    color: #ecf0f1;
    font-size: 1.2em;
    font-weight: 600;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9em;
    color: #bdc3c7;
    font-weight: 500;
}

#task-name-input,
#edit-task-name {
    padding: 12px 15px;
    border: 1px solid #4a5f70;
    border-radius: 8px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

#task-name-input:focus,
#edit-task-name:focus {
    border-color: #2ecc71;
    outline: none;
}

#task-name-input::placeholder,
#edit-task-name::placeholder {
    color: #95a5a6;
}

#task-priority-input,
#task-due-date-input,
#task-estimate-input,
#edit-task-due-date {
    padding: 12px 15px;
    border: 1px solid #4a5f70;
    border-radius: 8px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#task-priority-input:focus,
#edit-task-priority:focus,
#task-due-date-input:focus,
#task-estimate-input:focus,
#edit-task-due-date:focus {
    border-color: #2ecc71;
    outline: none;
}

#add-task-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1em;
}

#add-task-btn svg {
    width: 18px;
    height: 18px;
}

#add-task-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.task-list-container {
    min-height: 200px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#current-task-display {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
}

#current-task-display p {
    margin: 0;
    color: #ecf0f1;
}

/* Current task banner */
.current-task-banner {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.current-task-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.current-task-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-task-icon {
    font-size: 1.5em;
    animation: pulse 2s infinite;
}

.current-task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.current-task-label {
    font-size: 0.9em;
    color: #bdc3c7;
    font-weight: 500;
}

.current-task-name {
    font-size: 1.1em;
    color: #2ecc71;
    font-weight: 600;
}

.clear-task-btn {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-task-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.05);
}

.clear-task-btn svg {
    width: 16px;
    height: 16px;
}

/* Stats section */
#stats-section h3,
#task-section h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
}

/* Övriga justeringar för att förbättra utseendet och känslan */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #2ecc71;
    outline-offset: 2px;
}

.tab-btn:focus {
    outline: 2px solid #2ecc71;
    outline-offset: 2px;
}

/* Animationer för uppgiftshanteraren */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Förbättrade animationer */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes pulse-ring-animation {
    0% {
        filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.5));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(46, 204, 113, 0.8));
        transform: scale(1.02);
    }
    100% {
        filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.5));
        transform: scale(1);
    }
}

/* Förbättrad tillgänglighet och fokusindikationer */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #2ecc71;
    outline-offset: 2px;
}

.tab-btn:focus {
    outline: 2px solid #2ecc71;
    outline-offset: 2px;
}

/* Responsiv design för uppgifter */
@media (max-width: 480px) {
    .task-form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .task-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Responsiv design för hjälp-sektionen */
@media (max-width: 768px) {
    .help-category {
        padding: 1rem;
    }
    
    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .shortcut-item kbd {
        align-self: flex-start;
    }
    
    .help-content {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .help-category {
        padding: 0.75rem;
    }
    
    .help-category h4 {
        font-size: 1rem;
    }
    
    .shortcut-item kbd {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

.task-priority-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-complete-btn,
.task-start-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #95a5a6;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-complete-btn:hover {
    background-color: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.task-start-btn {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.task-start-btn:hover {
    background-color: rgba(52, 152, 219, 0.3);
    border-color: #3498db;
    color: #ffffff;
    transform: scale(1.05);
}

.task-item.completed .task-complete-btn {
    background-color: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

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

.task-item.completed {
    opacity: 0.8;
}

/* Enhanced task list */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.8), rgba(44, 62, 80, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.task-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.95), rgba(44, 62, 80, 1));
}

.task-item.current {
    border-color: #2ecc71;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.15));
    box-shadow: 0 8px 32px rgba(46, 204, 113, 0.3);
}

.task-item.current::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2ecc71, #27ae60, #2ecc71);
    border-radius: 16px 16px 0 0;
    animation: currentTaskGlow 2s ease-in-out infinite alternate;
}

@keyframes currentTaskGlow {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.task-item.completed {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.4), rgba(44, 62, 80, 0.5));
    border-color: rgba(255, 255, 255, 0.08);
    opacity: 0.7;
    transform: scale(0.98);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.task-name {
    margin: 0;
    color: #ecf0f1;
    font-size: 1.1em;
    font-weight: 600;
    flex: 1;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow flex item to shrink below content size */
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: #95a5a6;
}

.task-priority-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.task-priority {
    font-size: 1.2em;
}

.priority-badge {
    font-size: 0.7em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.priority-badge.high {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.priority-badge.medium {
    background: linear-gradient(135deg, #f39c12, #d68910);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.priority-badge.low {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
}

/* Mobile responsiveness for task cards */
@media (max-width: 600px) {
    .task-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .task-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .task-name {
        white-space: normal;
        margin-bottom: 8px;
    }
    
    .task-priority-row {
        justify-content: space-between;
        align-items: center;
    }
    
    .task-complete-btn,
    .task-action-btn.edit {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .task-details {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .task-estimate {
        padding: 8px 12px;
    }
    
    .priority-badge {
        font-size: 0.65em;
        padding: 2px 6px;
    }
}

.task-complete-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.task-complete-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
}

.task-item.completed .task-complete-btn {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.task-item.completed .task-complete-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
}

.task-action-btn.edit {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    flex-shrink: 0;
}

.task-action-btn.edit:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.task-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    color: #bdc3c7;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.task-due-date svg {
    width: 14px;
    height: 14px;
}

.task-due-date.today {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.task-due-date.overdue {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.task-due-date.soon {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.task-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #bdc3c7;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.task-estimate svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.task-progress-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.progress-text,
.duration-text {
    font-size: 0.85em;
    color: #bdc3c7;
}

.duration-text {
    font-style: italic;
    opacity: 0.8;
}

.task-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.task-status {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-icon {
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-icon svg {
    width: 64px;
    height: 64px;
    stroke: #95a5a6;
}

.empty-state h4 {
    margin: 0 0 12px 0;
    color: #bdc3c7;
    font-size: 1.3em;
}

.empty-state p {
    margin: 0;
    color: #95a5a6;
    font-size: 1em;
    line-height: 1.5;
}

/* Longpress animation */
.task-item.longpress-active {
    transform: scale(0.98);
    background: rgba(52, 73, 94, 0.8);
}

/* Context menu improvements */
.context-menu {
    position: fixed;
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.context-menu.show {
    opacity: 1;
    transform: scale(1);
}

.context-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #ecf0f1;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
    transition: all 0.2s ease;
    min-width: 140px;
}

.context-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-btn.delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.context-btn svg {
    width: 16px;
    height: 16px;
}

/* Modal improvements */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(52, 73, 94, 0.95);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #ecf0f1;
    font-size: 1.3em;
}

.close-btn {
    background: transparent;
    border: none;
    color: #bdc3c7;
    font-size: 1.5em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.modal-body {
    padding: 24px;
}

.modal-body .input-group {
    margin-bottom: 16px;
}

.modal-body .task-form-row {
    margin-bottom: 0;
}

/* Ensure two-column layout inside modal for priority/date */
.modal-body .task-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .modal-body .task-form-row {
        grid-template-columns: 1fr;
    }
}

#edit-task-name {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(52, 73, 94, 0.8);
    color: #ecf0f1;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    box-sizing: border-box;
}

#edit-task-name:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

#edit-task-priority,
#edit-task-due-date {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(52, 73, 94, 0.8);
    color: #ecf0f1;
    font-size: 0.95em;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#edit-task-priority:focus,
#edit-task-due-date:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

.primary-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-1px);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #4a5f70;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2ecc71;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2ecc71;
    cursor: pointer;
    border: none;
}

.small-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.small-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
}

#volume-display {
    min-width: 35px;
    text-align: center;
    font-size: 0.9em;
    color: #bdc3c7;
}

/* Timer Control Extensions */
.timer-extensions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.extend-btn, .skip-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
}

/* Mobile responsiveness for timer buttons */
@media (max-width: 480px) {
    .timer-extensions {
        gap: 8px;
        margin-top: 10px;
    }
    
    .extend-btn, .skip-btn {
        padding: 6px 12px;
        font-size: 0.8em;
        min-width: 100px;
        gap: 4px;
    }
    
    .timer-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .timer-controls button {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

.extend-btn:hover {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.skip-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

.extend-btn:disabled, .skip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.extend-btn:disabled:hover, .skip-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #bdc3c7;
}

/* Auto-resume settings */
#auto-resume-settings {
    margin-left: 20px;
    margin-top: 10px;
    padding: 10px;
    border-left: 3px solid #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 0 6px 6px 0;
}

#auto-resume-settings label {
    font-size: 0.9em;
    color: #bdc3c7;
}

#auto-resume-delay {
    width: 80px;
    padding: 4px 8px;
    margin-left: 10px;
    border: 1px solid #4a5f70;
    border-radius: 4px;
    background-color: #34495e;
    color: #ecf0f1;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #2ecc71;
    min-width: 250px;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #2ecc71;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.info {
    border-left-color: #3498db;
}

@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Goal Achievement Animation */
.goal-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    text-align: center;
    pointer-events: none;
}

.confetti {
    font-size: 3rem;
    animation: confetti 2s ease-out;
}

@keyframes confetti {
    0% { 
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

.goal-message {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4);
    animation: goalBounce 0.6s ease-out;
}

@keyframes goalBounce {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% { 
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}