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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #eef2f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.title {
    color: #1E3A8A;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 18px;
}

.top-pill {
    display: inline-block;
    background: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.top-pointer {
    width: 0;
    height: 0;
    margin: 8px auto 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #FF6B35;
}

.theme-input {
    margin-bottom: 20px;
}

.theme-input label {
    display: block;
    color: #1E3A8A;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.theme-input input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.theme-input input:focus {
    outline: none;
    border-color: #FF6B35;
}

.options-manager label {
    display: block;
    color: #1E3A8A;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.option-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.option-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.option-input-group input:focus {
    outline: none;
    border-color: #FF6B35;
}

.btn-add {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.btn-add:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.4);
}

.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.option-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #495057;
}

.option-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-container {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

#wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: transform 4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 6px solid #0F2645;
}

.pointer{display:none}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: 5;
    border: 5px solid #0F2645;
}

#theme-display {
    font-size: 0.8rem;
    color: #1E3A8A;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    max-width: none;
    word-wrap: break-word;
}

.controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

.btn-pill {
    background: #fff;
    color: #0F2645;
    border: 2px solid #0F2645;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.btn-primary {
    background: #fff;
}

.result {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1E3A8A;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #e9ecef;
}

.result.show {
    animation: fadeInUp 0.5s ease-out;
}

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

@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .wheel-wrapper {
        width: 280px;
        height: 280px;
    }
    
    #wheel {
        width: 260px;
        height: 260px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-spin, .btn-reset {
        width: 200px;
    }
}
/* Panel */
.panel.hidden{display:none}
.panel{position:fixed;inset:0;background:rgba(0,0,0,0.08);display:flex;align-items:center;justify-content:center;padding:20px;z-index:1000}
.panel .panel-body{background:#fff;border-radius:16px;box-shadow:0 20px 40px rgba(0,0,0,0.12);padding:18px;width:100%;max-width:420px;position:relative}
.panel-header{display:flex;align-items:center;gap:8px;margin-bottom:12px;justify-content:space-between}
.icon-btn{border:none;background:transparent;font-size:20px;cursor:pointer;color:#0F2645}
.panel-title{font-weight:700;color:#0F2645}
.panel-label{color:#6b7280;margin:6px 0;font-size:0.95rem}
.panel-input{width:100%;padding:10px 12px;border:2px solid #e5e7eb;border-radius:10px}
.add-dashed{display:flex;gap:8px;align-items:center;margin-top:14px;border:2px dashed #e5e7eb;padding:10px;border-radius:12px}

.list-container{display:flex;flex-direction:column;gap:8px}
.list-item{display:flex;align-items:center;justify-content:space-between;background:#fff;border:2px solid #e5e7eb;border-radius:12px;padding:10px 12px}
.list-title{color:#0F2645;font-weight:600}
.list-title-btn{background:transparent;border:none;color:#0F2645;font-weight:600;cursor:pointer;padding:0;text-align:left}
.list-actions{display:flex;gap:8px}
.icon-edit{border:none;background:#e5e7eb;color:#0F2645;border-radius:8px;padding:6px 10px;cursor:pointer}
.icon-delete{border:none;background:#fca5a5;color:#7f1d1d;border-radius:8px;padding:6px 10px;cursor:pointer}

/* Add decision */
.fab{position:fixed;right:24px;bottom:24px;background:#0F2645;color:#fff;border:none;width:44px;height:44px;border-radius:50%;box-shadow:0 10px 20px rgba(0,0,0,0.2);font-size:24px;cursor:pointer}
.dialog.hidden{display:none}
.dialog{position:fixed;inset:0;background:rgba(0,0,0,0.35);display:flex;align-items:center;justify-content:center;z-index:1100}
.dialog-card{background:#fff;border-radius:16px;box-shadow:0 20px 40px rgba(0,0,0,0.2);padding:16px;width:90%;max-width:360px}
.dialog-title{font-weight:700;color:#0F2645;margin-bottom:10px}
.dialog-input{width:100%;padding:10px 12px;border:2px solid #e5e7eb;border-radius:10px;background:#f3f4f6}
.dialog-actions{display:flex;gap:10px;justify-content:space-between;margin-top:12px}
.dialog-btn{flex:1;border:none;background:#e5e7eb;color:#0F2645;border-radius:10px;padding:10px 12px;cursor:pointer}
.dialog-primary{background:#ffebe6;color:#FF6B35}

.btn-add-decision{margin-top:12px;width:100%;background:#fff;color:#0F2645;border:2px solid #0F2645;border-radius:12px;padding:10px 12px;box-shadow:0 6px 12px rgba(0,0,0,0.08);font-weight:600;cursor:pointer}
