:root {
    /* Launch Gold Palette */
    --primary: #F39C12;
    --primary-hover: #E67E22;
    --secondary: #FDCB6E;
    --accent: #E74C3C;
    --bg: #0D0D0A;
    --surface: rgba(30, 30, 25, 0.6);
    --surface-hover: rgba(50, 50, 45, 0.8);
    --border: rgba(243, 156, 18, 0.2);
    --text: #FFFFFF;
    --text-muted: #A0A09A;
    --success: #2ECC71;
    
    --radius: 12px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s ease;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(243, 156, 18, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(231, 76, 60, 0.05) 0%, transparent 40%);
}

/* Glassmorphism utility */
.blur-effect {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem;
    border-radius: var(--radius);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

.project-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

select {
    background: rgba(0,0,0,0.5);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

button.secondary-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
}

button.secondary-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    padding: 0 1rem 1rem 1rem;
    height: calc(100vh - 100px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.nav-item:hover, .nav-item.active {
    background: rgba(243, 156, 18, 0.1);
    color: var(--primary);
}

.cat-progress {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}

.overall-progress {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.progress-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.progress-bar-container {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s ease;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Checklist Section */
.checklist-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    border-radius: var(--radius);
    padding-right: 0.5rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
}

.check-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
}

.check-item:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.check-item.completed {
    opacity: 0.6;
    border-color: rgba(46, 204, 113, 0.3);
}

.check-item.completed h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.checkbox-wrapper input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--success);
    border-color: var(--success);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.critical {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent);
}

.badge.important {
    background: rgba(243, 156, 18, 0.2);
    color: var(--primary);
}

.badge.nice-to-have {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success);
}

.item-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.action-btn:hover {
    color: var(--secondary);
    background: none;
    transform: none;
    text-decoration: underline;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content input, .modal-content textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    outline: none;
}

.modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-content input:focus, .modal-content textarea:focus {
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.details-modal {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.details-badges {
    display: flex;
    gap: 0.5rem;
}

.resources-section ul {
    list-style: none;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resources-section li a {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resources-section li a:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

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

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
    }
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
