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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #1a2a1a, #0d2818, #1a3a2a);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px;
}

header {
    text-align: center;
    padding: 30px 0 20px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, #56ab2f, #a8e063);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin-top: 8px;
    color: #aaa;
    font-size: 0.9rem;
}

.input-section { margin-top: 24px; }

.step { margin-bottom: 28px; }

.step h2 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #56ab2f, #a8e063);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cat-btn, .time-btn, .reason-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid transparent;
    color: #fff;
    padding: 12px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn:hover, .time-btn:hover, .reason-btn:hover {
    background: rgba(255, 255, 255, 0.13);
}

.cat-btn.active, .time-btn.active, .reason-btn.active {
    border-color: #56ab2f;
    background: rgba(86, 171, 47, 0.15);
}

.time-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.reason-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.generate-btn {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    background: linear-gradient(90deg, #56ab2f, #a8e063);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.generate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.generate-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

/* Result */
.result-section {
    margin-top: 32px;
    animation: fadeInUp 0.5s ease;
}

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

.result-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.verdict-area {
    text-align: center;
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 16px;
}

.verdict-area.throw {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(192, 57, 43, 0.1));
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.verdict-area.keep {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.verdict-area.maybe {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.15), rgba(243, 156, 18, 0.1));
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.verdict-emoji {
    font-size: 3rem;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.verdict-text {
    font-size: 1.5rem;
    font-weight: 900;
    margin-top: 8px;
}

.verdict-area.throw .verdict-text { color: #e74c3c; }
.verdict-area.keep .verdict-text { color: #2ecc71; }
.verdict-area.maybe .verdict-text { color: #f1c40f; }

.verdict-subtitle {
    margin-top: 4px;
    color: #aaa;
    font-size: 0.85rem;
}

.result-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.cat-tag { background: rgba(86, 171, 47, 0.2); color: #a8e063; }
.time-tag { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.reason-tag { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.advice-text {
    font-size: 0.95rem;
    line-height: 1.8;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border-left: 4px solid #56ab2f;
    white-space: pre-wrap;
}

.meters {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meter-label {
    font-size: 0.8rem;
    color: #aaa;
    width: 56px;
}

.meter-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
    width: 0;
}

.throw-fill { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.regret-fill { background: linear-gradient(90deg, #3498db, #2980b9); }

.meter-value {
    font-weight: 700;
    font-size: 0.9rem;
    width: 36px;
    text-align: right;
}

.tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(86, 171, 47, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #a0aec0;
    border-left: 3px solid #56ab2f;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.share-btn {
    flex: 1;
    padding: 12px;
    border: none;
    color: #fff;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-x {
    background: #000;
    border: 2px solid #333;
}

.btn-line {
    background: #06C755;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.retry-btn.btn-retry {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: 2px solid rgba(86, 171, 47, 0.4);
    background: rgba(86, 171, 47, 0.1);
    color: #a8e063;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn.btn-retry:hover {
    background: rgba(86, 171, 47, 0.2);
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #56ab2f;
    color: #fff;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: bottom 0.3s ease;
    z-index: 100;
}

.toast.show { bottom: 30px; }

footer {
    margin-top: 48px;
    text-align: center;
    color: #555;
    font-size: 0.75rem;
    padding-bottom: 24px;
}

footer .copyright { margin-top: 8px; }

@media (max-width: 400px) {
    h1 { font-size: 1.4rem; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .time-buttons { grid-template-columns: repeat(2, 1fr); }
}
