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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #0a0a2a, #1a0a3a, #0a1a3a);
    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, #a18cd1, #fbc2eb);
    -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, #a18cd1, #fbc2eb);
    border-radius: 50%; font-size: 0.75rem; font-weight: 700; color: #fff;
}

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

.symbol-btn {
    background: rgba(255,255,255,0.07); border: 2px solid transparent;
    color: #fff; padding: 12px 6px; border-radius: 12px;
    font-size: 0.8rem; font-family: inherit; cursor: pointer; transition: all 0.2s;
}
.symbol-btn:hover { background: rgba(255,255,255,0.13); }
.symbol-btn.active { border-color: #a18cd1; background: rgba(161,140,209,0.15); }

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

.mood-btn {
    background: rgba(255,255,255,0.07); border: 2px solid transparent;
    color: #fff; padding: 14px 6px; border-radius: 12px;
    font-family: inherit; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.mood-btn:hover { background: rgba(255,255,255,0.13); }
.mood-btn.active { border-color: #a18cd1; background: rgba(161,140,209,0.15); }
.mood-emoji { font-size: 1.5rem; }
.mood-label { font-size: 0.8rem; font-weight: 700; }

.generate-btn {
    width: 100%; margin-top: 8px; padding: 16px;
    background: linear-gradient(90deg, #a18cd1, #fbc2eb);
    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(161,140,209,0.4); }

.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);
}

.fortune-header { text-align: center; margin-bottom: 16px; }

.fortune-stars { font-size: 1.8rem; letter-spacing: 4px; }

.fortune-rank {
    font-size: 1.3rem; font-weight: 900; margin-top: 4px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.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; }
.symbol-tag { background: rgba(161,140,209,0.2); color: #a18cd1; }
.mood-tag { background: rgba(251,194,235,0.2); color: #fbc2eb; }

.interpretation-area, .psychology-area { margin-bottom: 16px; }
.interpretation-area h3, .psychology-area h3 {
    font-size: 0.85rem; color: #a18cd1; margin-bottom: 8px;
}

.interpretation-text, .psychology-text {
    font-size: 0.9rem; line-height: 1.8; padding: 16px;
    background: rgba(0,0,0,0.25); border-radius: 12px;
    white-space: pre-wrap;
}
.interpretation-text { border-left: 4px solid #a18cd1; }
.psychology-text { border-left: 4px solid #fbc2eb; }

.lucky-area {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-top: 16px;
}

.lucky-item {
    background: rgba(255,255,255,0.05); border-radius: 12px;
    padding: 12px 8px; text-align: center;
}

.lucky-label { display: block; font-size: 0.7rem; color: #888; margin-bottom: 4px; }
.lucky-value { font-size: 0.85rem; font-weight: 700; }

.tip {
    margin-top: 16px; padding: 12px 16px;
    background: rgba(161,140,209,0.1); border-radius: 10px;
    font-size: 0.8rem; color: #a0aec0; border-left: 3px solid #a18cd1;
}

.action-buttons { margin-top: 16px; }

.share-buttons { display: flex; gap: 10px; margin-bottom: 8px; }

.action-btn {
    flex: 1; padding: 12px; border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: #fff; border-radius: 12px;
    font-size: 0.85rem; font-family: inherit; cursor: pointer; transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.12); }

.btn-x { background: rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.3); }
.btn-x:hover { background: rgba(0,0,0,0.55); }
.btn-line { background: rgba(6,199,85,0.15); border-color: rgba(6,199,85,0.4); color: #06c755; }
.btn-line:hover { background: rgba(6,199,85,0.25); }
.btn-copy { background: rgba(161,140,209,0.15); border-color: rgba(161,140,209,0.4); color: #a18cd1; }
.btn-copy:hover { background: rgba(161,140,209,0.25); }
.btn-retry { width: 100%; }

.toast {
    position: fixed; bottom: -50px; left: 50%; transform: translateX(-50%);
    background: #a18cd1; 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; }
    .symbol-grid { grid-template-columns: repeat(2, 1fr); }
    .mood-buttons { grid-template-columns: repeat(2, 1fr); }
    .lucky-area { grid-template-columns: 1fr; }
}
