:root {
    --primary: #2196f3;
    --secondary: #1565c0;
    --success: #4caf50;
    --danger: #f44336;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

.todo-app {
    width: 100%;
    max-width: 800px;
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate3d(1, 1, 0, 0deg); }
    50% { transform: translateY(-10px) rotate3d(1, 1, 0, 2deg); }
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-content h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transform: translateZ(20px);
}

.task-input-wrapper {
    margin-bottom: 24px;
}

.input-box {
    display: flex;
    align-items: center;
    background: var(--background);
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateZ(10px);
}

.input-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 0 16px;
    font-size: 1rem;
    color: var(--text);
}

.input-box input:focus {
    outline: none;
}

.add-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.add-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px) translateZ(20px);
}

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: var(--background);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateZ(5px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

.tasks-list {
    list-style: none;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--background);
    border-radius: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.task-item:hover {
    transform: translateY(-2px) translateZ(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.checkbox-wrapper {
    position: relative;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-wrapper label {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    cursor: pointer;
}

.time{
    background-color: rgba(255, 166, 0, 0.262);
    padding: .5rem 1rem;
    border-radius: 4rem;
    color:rgb(28, 135, 149);
    font-weight: 400;
}
.date-display{
    background-color: rgba(255, 166, 0, 0.164);
    display: inline;
    padding: .3rem 2rem;
    border-radius: 3rem;
}
.task-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.priority {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.fa-check-double{
    background-color: #1565c0;
    padding: .5rem;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.priority.high {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}
.lineheight{
    text-decoration: line-through;
    color: grey;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--background);
    transform: translateZ(15px);
}
.edit:hover{
    color: green;
    scale: 2;
}
.action-btn.delete:hover {
    color: var(--danger);
    scale: 2;
}
/* Modern Edit Input Styling */
.edit-input {
  width: 100%;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  background-color: #f8f9fa;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.edit-input:focus {
  border-color: #2c7be5;
  box-shadow: 0 2px 12px rgba(44, 123, 229, 0.3);
  background-color: #fff;
}

/* Animation when input appears */
@keyframes slideIn {
  from { transform: translateY(-5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.edit-input {
  animation: slideIn 0.2s ease-out forwards;
}

/* For dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .edit-input {
    background-color: #2d3748;
    color: #f7fafc;
    border-color: #4a5568;
  }
  
  .edit-input:focus {
    background-color: #1a202c;
    border-color: #63b3ed;
  }
}

@media (max-width: 768px) {
    .todo-app {
        padding: 20px;
        margin: 10px;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .filters {
        overflow-x: auto;
        padding-bottom: 8px;
    }
}
/* Responsive Media Queries */
@media (max-width: 1200px) {
    .todo-app {
        max-width: 700px;
    }
}

@media (max-width: 992px) {
    .todo-app {
        max-width: 600px;
        padding: 28px;
    }
    
    .header-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .todo-app {
        max-width: 90%;
        padding: 24px;
        margin: 15px auto;
        animation: float 8s ease-in-out infinite; /* Slower animation */
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .input-box {
        padding: 12px;
    }
    
    .task-item {
        padding: 12px;
        flex-direction: column;
        gap: 12px;
    }
    
    .task-content {
        width: 100%;
        justify-content: space-between;
    }
    
    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    
    .todo-app {
        padding: 20px;
        border-radius: 20px;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .input-box input {
        font-size: 0.9rem;
    }
    
    .add-btn {
        width: 36px;
        height: 36px;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .time, .date-display {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .todo-app {
        padding: 16px;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .input-box {
        padding: 10px;
    }
    
    .task-item {
        padding: 10px;
    }
    
    .edit-input {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Tablet Landscape */
/* Mobile-First Modern Design (<= 768px) */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        padding: 12px;
    }

    .todo-app {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 28px;
        box-shadow: 
            0 10px 25px rgba(0, 0, 0, 0.15),
            0 5px 10px rgba(0, 0, 0, 0.05);
        animation: floatMobile 8s ease-in-out infinite;
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    @keyframes floatMobile {
        0%, 100% { transform: translateY(0) rotate(0deg); }
        50% { transform: translateY(-8px) rotate(1deg); }
    }

    .app-header {
        flex-direction: column;
        /* gap: 20px; */
        margin-bottom: 24px;
    }

    .header-content h1 {
        font-size: 1.8rem;
        color: #2c3e50;
        text-align: center;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .badge {
        /* margin-top: 8px; */
        font-size: 0.8rem;
        padding: 4px 16px;
        background: linear-gradient(90deg, #2196f3 0%, #21cbf3 100%);
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    }
    p{
        text-align:center;
    }
    .time, .date-display {
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(5px);
        padding: 8px 16px;
        border-radius: 24px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        /* margin: 1rem 1rem; */
    }
    .date-display{
        margin-top: 1rem;
    }

    .input-box {
        padding: 14px;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .input-box input {
        font-size: 1rem;
        color: #2c3e50;
    }

    .input-box input::placeholder {
        color: #a1a8b4;
    }

    .add-btn {
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    }

    .task-item {
        padding: 18px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(0, 0, 0, 0.05);
        margin-bottom: 16px;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .task-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }

    .fa-check-double {
        background: linear-gradient(135deg, #1565c0 0%, #2196f3 100%);
        width: 32px;
        height: 32px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.03);
    }

    .edit:hover {
        color: #4caf50;
        background: rgba(76, 175, 80, 0.1);
        transform: scale(1.1);
    }

    .action-btn.delete:hover {
        color: #f44336;
        background: rgba(244, 67, 54, 0.1);
        transform: scale(1.1);
    }

    /* Modern Edit Input */
    .edit-input {
        padding: 12px 16px;
        border: 2px solid rgba(33, 150, 243, 0.3);
        background: rgba(255, 255, 255, 0.9);
        font-size: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .edit-input:focus {
        border-color: #2196f3;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    }
}