html, body {
    max-width: 1200px; /* Restrict maximum width */
    overflow-x: hidden; /* prevents horizontal scroll */
    margin: 0 auto; /* Center the app */
}

.container,
.progress-container,
.list-container,
.add-item,
.tabs,
.progress-bar,
.tab-content {
    width: 100%;
    max-width: 1200px; /* Restrict maximum width */
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a202c; /* Replace gradient with solid color */
    min-height: 100vh;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Container - Mobile First Responsive Design */
.container {
    width: 95%;
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

/* Tablet and small laptop */
@media (min-width: 768px) {
    .container {
        width: 90%;
        max-width: 700px;
        padding: 2rem 1.5rem;
    }
}

/* Medium laptop and desktop */
@media (min-width: 1024px) {
    .container {
        width: 700px;
        max-width: 700px;
        padding: 2rem;
    }
}

/* Large desktop */
@media (min-width: 1440px) {
    .container {
        width: 800px;
        max-width: 800px;
        padding: 2.5rem;
    }
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.progress-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.progress-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
}

.progress-percentage {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-stats {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
}

.items-packed {
    color: #4ecdc4;
    font-weight: 600;
}

.total-items {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0.75rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.tab-btn:hover::before {
    opacity: 0.1;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    opacity: 0;
}

.tab-content {
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: block;
}

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

.list-container {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.add-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.add-item input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
}

.add-item input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: #1a1a1a;
}

.add-item input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.add-btn {
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.add-btn:active {
    transform: translateY(-1px);
}

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

.list-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.list-item:last-child {
    margin-bottom: 0;
}

.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checkbox:hover {
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.checkbox.checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.item-text {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.item-text.completed {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.7;
    font-weight: 400;
}

.delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
    color: #dc2626;
}

.delete-btn svg {
    width: 18px;
    height: 18px;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-item:hover .item-actions {
    opacity: 1;
}

.edit-btn {
    background: none;
    border: none;
    color: #4ecdc4;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-btn:hover {
    background: rgba(78, 205, 196, 0.1);
    transform: scale(1.1);
    color: #45b7d1;
}

.edit-btn svg {
    width: 18px;
    height: 18px;
}

.drag-handle {
    cursor: grab;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
}

.drag-handle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle svg {
    width: 18px;
    height: 18px;
}

.edit-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.edit-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Sortable.js styles */
.sortable-ghost {
    opacity: 0.5;
    background: rgba(102, 126, 234, 0.1) !important;
    border: 2px dashed #667eea !important;
}

.sortable-chosen {
    background: rgba(78, 205, 196, 0.1) !important;
    transform: scale(1.02);
}

.sortable-drag {
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    transform: rotate(5deg);
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    border-radius: 50%;
    pointer-events: none;
    animation: confettiFall 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 1000;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(50px) rotate(180deg) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(120px) rotate(360deg) scale(0.8);
    }
}

/* Custom scrollbar */
.item-list::-webkit-scrollbar {
    width: 8px;
}

.item-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.item-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 4px;
}

.item-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .tab-btn {
        padding: 1rem 1.5rem;
    }
    
    .add-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .list-container {
        padding: 2rem 1.5rem;
    }
    
    .list-item {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }
    
    .checkbox {
        width: 24px;
        height: 24px;
    }
    
    .item-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .list-container {
        padding: 1.5rem 1rem;
    }
    
    .add-item input,
    .add-btn {
        padding: 1rem 1.25rem;
    }
}

