:root {
    --accent: #b45309; 
    --highlight: #fbbf24; 
    --bg-dark: #0f172a; 
    --panel-bg: rgba(30, 20, 10, 0.85); 
    --gold: #f59e0b;
    --border-color: #78350f;
    --text-main: #fef3c7;
    --gem-slot: #1a120b;
    --success: #2ecc71;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('https://img.itch.zone/aW1hZ2UvMzk1ODQ1Ny8yNDI2NjgzNy5wbmc=/original/A6ncir.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 50px; 
}

.title {
    width: 100%;
    text-align: center;
    padding: 30px 0;
    font-size: 32px;
    font-weight: bold;
    border-bottom: 4px solid var(--accent);
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--gold);
}

/* --- MAIN SIDEBAR LAYOUT STYLES --- */
.main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.sidebar {
    flex: 1 1 240px;
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.sidebar h3 {
    color: var(--highlight);
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 0;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav button {
    width: 100%;
    background: var(--gem-slot);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.2s;
    text-align: left;
}

.sidebar-nav button:hover {
    background: var(--accent);
    color: white;
}

.main-content {
    flex: 3 1 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- CHECKLIST INTERFACE CONTAINER --- */
.checklist-container {
    width: 100%;
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    margin-bottom: 30px;
}

.checklist-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-bottom: 2px solid var(--gold);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.checklist-header h2 {
    margin: 0;
    color: var(--highlight);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 22px;
}

/* Progress Tracker Styling */
.progress-bar-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
    height: 20px;
    overflow: hidden;
    position: relative;
    margin-top: 5px;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--gold));
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-text {
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.checklist-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.checklist-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
}

.checklist-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--highlight);
    font-size: 18px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 8px;
    letter-spacing: 1px;
}

/* Checklist Item Custom Controls */
.task-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(120, 53, 15, 0.2);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

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

.task-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.task-checkbox-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.task-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: var(--gem-slot);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.task-checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--accent);
    border-color: var(--highlight);
    box-shadow: 0 0 8px var(--gold);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.task-checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.task-checkbox-wrapper .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--text-main);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.task-text {
    font-size: 15px;
    line-height: 1.5;
    color: #e2e8f0;
    transition: color 0.2s, text-decoration 0.2s;
}

.task-item.completed .task-text {
    color: #888888;
    text-decoration: line-through;
}

kbd {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
    color: var(--highlight);
    display: inline-block;
    font-size: 12px;
    font-family: monospace;
    padding: 2px 5px;
    margin: 0 2px;
}

.reset-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 0 10px;
}

.reset-btn {
    background: var(--gem-slot);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.2s;
    font-size: 12px;
}

.reset-btn:hover {
    background: #ef4444;
    color: white;
}

.motivation-panel {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PHONE COMPATIBILITY OVERRIDES --- */
@media (max-width: 950px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
    }

    .checklist-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 0 20px 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .checklist-header {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }

    .sidebar {
        width: 95% !important;
        order: 2; 
        margin-bottom: 30px;
    }
    
    .title {
        font-size: 24px;
        padding: 20px 10px;
        letter-spacing: 2px;
    }
    
    .checklist-body {
        padding: 15px;
        gap: 15px;
    }
    
    .task-text {
        font-size: 14px;
    }
}
