:root {
    --bg-color: #0b0f19;
    --surface-color: rgba(26, 32, 44, 0.6);
    --surface-highlight: rgba(45, 55, 72, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --glow-gold: rgba(251, 191, 36, 0.2);
    --glow-red: rgba(239, 68, 68, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Dynamic Background Orbs */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-red) 0%, transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--glow-gold) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 50%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Layout */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.app-footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Views & Transitions */
.view {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Home View Styles */
.header-content {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header-content .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.board-selection h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.instruction {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.board-option {
    cursor: pointer;
    position: relative;
}

.board-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card {
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.option-card h3 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.option-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.board-option input:checked ~ .option-card {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px var(--glow-gold);
}

.board-option:hover .option-card {
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--glow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow-gold);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-box p {
    color: #fca5a5;
    font-size: 0.9rem;
    margin: 0;
}

/* Checklist View Styles */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.checklist-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary.btn-icon {
    width: 36px;
    height: 36px;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 400px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

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

.modal-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

/* Smart Assumption Box */
.assumption-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
    animation: fade-in 0.4s ease-out;
}

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

.assumption-title {
    color: var(--accent-green);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.assumption-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.assumption-text span {
    font-weight: 800;
    color: var(--accent-gold);
}

/* Creator text */
.creator {
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Categories & Items */
.category-section {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.category-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 1rem;
}

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clue-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    color: var(--text-primary);
}

.clue-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.clue-checkbox {
    appearance: none;
    background-color: rgba(0,0,0,0.2);
    margin: 0;
    font: inherit;
    color: var(--accent-gold);
    width: 1.15em;
    height: 1.15em;
    border: 1px solid var(--text-secondary);
    border-radius: 0.15em;
    display: grid;
    place-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.clue-checkbox::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--accent-gold);
    background-color: CanvasText;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.clue-checkbox:checked::before {
    transform: scale(1);
}

.clue-checkbox:checked {
    border-color: var(--accent-gold);
}

/* Checked styling */
.clue-item.is-checked {
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.05);
}

.clue-item.is-checked .clue-text {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Character Color Coding */
.clue-item[data-character="Colonel Mustard"] { border-left: 4px solid #eab308; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Professor Plum"] { border-left: 4px solid #a855f7; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Mr. Green"] { border-left: 4px solid #22c55e; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Mrs. Peacock"] { border-left: 4px solid #3b82f6; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Miss Scarlet"] { border-left: 4px solid #ef4444; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Dr. Orchid"] { border-left: 4px solid #ec4899; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Madame Rose"] { border-left: 4px solid #f43f5e; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Sgt. Gray"] { border-left: 4px solid #6b7280; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="M. Brunette"] { border-left: 4px solid #b45309; padding-left: calc(0.5rem - 3px); }
.clue-item[data-character="Miss Peach"] { border-left: 4px solid #fb923c; padding-left: calc(0.5rem - 3px); }

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
    }
    .glass-panel {
        padding: 1.5rem;
        border-radius: 20px;
    }
    }
}
