/* What Now? Checklist - Mobile-First Responsive Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: calc(100vh - 20px);
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3498db;
}

.nav-link.active {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    font-weight: 600;
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 15px;
    border: none;
    background: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .nav-link {
        padding: 20px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin: 0 20px;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
}

/* Loading and Status */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.last-updated {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.9rem;
    border-bottom: 1px solid #e9ecef;
}

/* Add Item Form */
.add-item-form {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f639a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Category Sections */
.categories {
    display: grid;
    gap: 20px;
    padding: 20px;
}

.category-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    padding: 15px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Checklist Items */
.checklist-items {
    padding: 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    background: #f8f9fa;
}

.checklist-item.completed {
    background: #f8fff8;
    opacity: 0.8;
}

.checklist-item.completed .item-task {
    text-decoration: line-through;
    color: #6c757d;
}

/* Priority Colors */
.checklist-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ddd;
}

.checklist-item.priority-high::before {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.checklist-item.priority-medium::before {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.checklist-item.priority-low::before {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

/* Checkbox */
.item-checkbox {
    margin-right: 15px;
    margin-top: 2px;
}

.item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.2);
}

/* Item Content */
.item-content {
    flex: 1;
    min-width: 0;
}

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

.item-task {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
    word-wrap: break-word;
}

.item-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.priority-high {
    background: #fee;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

.priority-medium {
    background: #fef9e7;
    color: #d68910;
    border: 1px solid #f7dc6f;
}

.priority-low {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

/* Notes */
.item-notes {
    margin-top: 8px;
}

.item-notes textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-height: 60px;
    resize: vertical;
    background: #fafafa;
}

.item-notes textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-height: 32px;
}

.btn-primary.btn-sm {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
}

.btn-primary.btn-sm:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

/* Responsive Design */
@media (min-width: 768px) {
    body {
        padding: 20px;
    }
    
    .categories {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .form-row {
        flex-wrap: nowrap;
    }
    
    .form-group {
        min-width: 150px;
    }
}

@media (min-width: 1200px) {
    .categories {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 15px;
    }
}

@media (min-width: 1600px) {
    .categories {
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .categories {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: unset;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .item-priority {
        align-self: flex-start;
    }
    
    .item-actions {
        flex-wrap: wrap;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Success/Error Messages */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .add-item-form,
    .item-actions,
    .btn {
        display: none !important;
    }
    
    .categories {
        padding: 20px;
    }
}