:root {
    --primary-bg: #f5fbff;
    --primary-dark: #0f394c;
    --primary-accent: #49b5e7;
    --white: #fff;
    --pending: #ffb142;
    --running: #3498db;
    --completed: #2ecc71;
    --mobile-nav-height: 60px;
    --desktop-nav-height: 70px;
}

body {
    background-color: var(--primary-bg);
    color: var(--primary-dark);
    min-height: 100vh;
    padding: 0 0 var(--mobile-nav-height);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.head-section {
    text-align: center;
    padding: 30px 0 20px;
    margin-bottom: 20px;
    position: relative;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.head-section h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.head-section p {
    font-size: 1.1rem;
    margin: 0 auto 25px;
    line-height: 1.6;
    max-width: 600px;
    color: #4a6b7d;
}

.highlight {
    color: var(--primary-accent);
    font-weight: 700;
}

.header-decoration {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(73,181,231,0.15) 0%, rgba(255,255,255,0) 70%);
    z-index: 1;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    background: var(--white);
    border-radius: 12px;
    margin: 0 auto 30px;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(15, 57, 76, 0.08);
    overflow: hidden;
}

.desktop-nav-container {
    display: flex;
    justify-content: space-around;
}

.desktop-nav-item {
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    flex: 1;
    position: relative;
    font-weight: 600;
    color: var(--primary-dark);
}

.desktop-nav-item.active {
    color: var(--primary-accent);
    background: rgba(73, 181, 231, 0.1);
}

.desktop-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-accent);
}

.desktop-task-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
    padding: 0;
    border-radius: 20px;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Form Styles */
.form-container, .task-list-container {
    background: var(--white);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(15, 57, 76, 0.08);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.form-container::before, .task-list-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-accent), var(--primary-dark));
}

.form-container h2 {
    font-size: 1.7rem;
    margin-bottom: 25px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-container h2 i {
    color: var(--primary-accent);
    background-color: #f0f9ff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1f0f8;
    border-radius: 12px!important;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--primary-bg);
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    border-color: var(--primary-accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(73, 181, 231, 0.15);
    background-color: var(--white);
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    background-color: var(--primary-accent);
    color: var(--white)!important;
    border: none;
    padding: 16px 25px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(73, 181, 231, 0.3);
}

.btn:hover {
    background-color: #3a9bca;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(73, 181, 231, 0.4);
}

/* Task List Styles */

.task-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.task-list-header h2 {
    font-size: 1.7rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-list-header h2 i {
    color: var(--primary-accent);
    background-color: #f0f9ff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #e1f0f8;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 135px;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-accent);
    color: var(--white);
}

.task-list {
    list-style: none;
    padding-left: 0;
}

.task-item {
    background: var(--primary-bg);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s;
    animation: fadeIn 0.4s ease-out;
    border-left: 5px solid var(--primary-accent);
    box-shadow: 0 4px 10px rgba(15, 57, 76, 0.05);
    position: relative;
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 57, 76, 0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.task-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    word-break: break-word;
    flex: 1;
    min-width: 200px;
}

.task-status, .status-select {
    position: absolute;
    right: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.status-select option {
    background: white;
    color: black;
}

.status-pending {
    background: #fff9db;
    color: #e67700;
    border: 2px solid #ffe066;
}

.status-running {
    background: #d0ebff;
    color: #1c7ed6;
    border: 2px solid #74c0fc;
}

.status-completed {
    background: #d3f9d8;
    color: #2f9e44;
    border: 2px solid #8ce99a;
}

.task-description {
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.6;
    word-break: break-word;
    padding: 0 5px;
    opacity: 0.9;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 2px solid #e1f0f8;
    flex-wrap: wrap;
    gap: 15px;
}

.task-deadline {
    font-size: 0.95rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background-color: #e1f0f8;
    padding: 8px 15px;
    border-radius: 30px;
}

.task-deadline i {
    color: var(--primary-accent);
}

.task-actions button {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    background-color: #fff0f0;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.task-actions button:hover {
    color: #ff0000;
    background-color: #ffe3e3;
    transform: scale(1.05);
}

/* Stats Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e1f0f8;
}

.stat-box {
    text-align: center;
    padding: 20px 15px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e1f0f8, var(--primary-bg));
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(15, 57, 76, 0.05);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(15, 57, 76, 0.1);
}

.stat-box h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.stat-box p {
    font-size: 0.95rem;
    color: var(--primary-accent);
    font-weight: 700;
}

/* Deadlines Page */
.deadline-list {
    list-style: none;
    padding-left: 0;
}

.deadline-item {
    background: var(--primary-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(15, 57, 76, 0.05);
    border-left: 4px solid var(--primary-accent);
}

.deadline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.deadline-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: #e1f0f8;
    padding: 6px 12px;
    border-radius: 8px;
}

.deadline-tasks {
    padding-left: 20px;
}

.deadline-task {
    padding: 10px 0;
    border-bottom: 1px dashed #e1f0f8;
}

.deadline-task:last-child {
    border-bottom: none;
}

.deadline-task-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deadline-task-title i {
    color: var(--primary-accent);
    font-size: 0.9rem;
}

.deadline-task-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 5.5rem;
    color: #e1f0f8;
    margin-bottom: 25px;
}

.empty-state h3 {
    font-size: 1.7rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.empty-state p {
    color: var(--primary-accent);
    max-width: 400px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(15, 57, 76, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    flex: 1;
    height: 100%;
}

.nav-item.active {
    background: rgba(73, 181, 231, 0.1);
}

.nav-item i {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
    transition: all 0.3s;
}

.nav-item.active i {
    color: var(--primary-accent);
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    transition: all 0.3s;
}

.nav-item span.task-count {
    color: var(--white)!important;
}

.nav-item.active span {
    color: var(--primary-accent);
}

.task-count {
    position: absolute;
    top: 5px;
    right: 20px;
    background: var(--primary-accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-list-container .deadline-list .deadline-item .deadline-tasks .deadline-task-container {
    flex: 1;
    text-align: right;
}

/* Responsive Design */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
    
    .desktop-nav {
        display: block;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .scroll-top {
        bottom: 75px;
    }
}

@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .head-section h1 {
        font-size: 2.2rem;
    }
    
    .form-container, .task-list-container {
        padding: 25px 20px;
    }
    
    .task-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .head-section h1 {
        font-size: 2rem;
    }
    
    .form-container, .task-list-container {
        padding: 20px 15px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
    }
    
    .task-item {
        padding: 18px;
    }
    
    .nav-item span {
        font-size: 0.75rem;
    }
    
    .task-count {
        top: 2px;
        right: 15px;
    }

    .task-header {
        flex-direction: column-reverse;
    }

    .status-select {
        margin: auto;
    }

    .modals {
        align-items: center!important;
    }
}


.edit-action {
    background: #d0ebff!important;
    color: #1c7ed6!important;
}

/* Modal backdrop */
.modals {
  display: none; 
  position: fixed;
  z-index: 10000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.4);
  align-items: baseline;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  margin: 3% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 30px rgba(15,57,76,0.2);
}
.modal-content h2 {
    font-size: 25px;
    margin-bottom: 20px;
}

.modals .close {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-dark);
}

.modals.show {
    display: flex;
}