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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 228, 230, 0.6), transparent 60%),
        radial-gradient(circle at 100% 0%, rgba(219, 234, 254, 0.7), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #fef9ff 40%, #f5f3ff 100%);
    color: #111827;
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0% 0%, #fee2e2, #f5d0fe, #bfdbfe);
    box-shadow:
        0 8px 18px rgba(148, 163, 184, 0.45),
        0 0 0 1px rgba(248, 250, 252, 0.9);
    font-size: 1.1rem;
}

.logo-text {
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4b5563;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    font-size: 0.95rem;
    color: #6b7280;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    transition: all 0.2s ease-out;
}

.nav-link:hover {
    color: #4b5563;
    background: rgba(248, 250, 252, 0.9);
}

.section {
    padding: 48px 0;
}

.hero-section {
    padding-top: 40px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: center;
}

.hero-text {
    max-width: 520px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.9);
    color: #4b5563;
    border: 1px solid #dbeafe;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 20px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f973b7 0%, #fb7185 30%, #f97373 100%);
    color: white;
    font-weight: 500;
    font-size: 0.98rem;
    text-decoration: none;
    box-shadow:
        0 14px 30px rgba(248, 113, 113, 0.35),
        0 0 0 1px rgba(254, 242, 242, 0.7);
    transition: all 0.2s ease-out;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 18px 40px rgba(248, 113, 113, 0.45),
        0 0 0 1px rgba(254, 242, 242, 0.9);
}

.hero-note {
    font-size: 0.8rem;
    color: #9ca3af;
}

.hero-visual {
    position: relative;
    min-height: 230px;
}

.hero-card {
    border-radius: 24px;
    background: white;
    box-shadow:
        0 20px 40px rgba(148, 163, 184, 0.35),
        0 0 0 1px rgba(229, 231, 235, 0.9);
}

.hero-card-main {
    padding: 18px 18px 20px;
}

.hero-card-label {
    font-size: 0.84rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.hero-card-emotion {
    font-size: 1.05rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    border: 1px solid;
}

.badge-soft {
    border-color: #f9a8d4;
    background: #fdf2f8;
    color: #db2777;
}

.hero-card-mini {
    position: absolute;
    right: 0;
    bottom: -14px;
    width: 190px;
    padding: 14px 14px 16px;
}

.hero-mini-title {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.hero-mini-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mini-bar {
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, #bfdbfe, #a5b4fc);
}

.mini-bar-2 {
    height: 52px;
    background: linear-gradient(180deg, #fecaca, #f9a8d4);
}

.mini-bar-3 {
    height: 32px;
    background: linear-gradient(180deg, #bbf7d0, #6ee7b7);
}

.hero-bg-pill {
    position: absolute;
    border-radius: 999px;
    filter: blur(0px);
    opacity: 0.45;
    z-index: -1;
}

.hero-bg-pill-1 {
    width: 220px;
    height: 110px;
    right: -20px;
    top: -24px;
    background: radial-gradient(circle at 0% 0%, #fee2e2, #fecaca, #e0f2fe);
}

.hero-bg-pill-2 {
    width: 160px;
    height: 90px;
    left: -10px;
    bottom: -26px;
    background: radial-gradient(circle at 0% 0%, #f3e8ff, #e0f2fe);
}

.section-header {
    margin-bottom: 18px;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.section-header p {
    font-size: 0.95rem;
    color: #6b7280;
}

.section-body {
    margin-top: 16px;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 22px 24px;
    box-shadow:
        0 18px 35px rgba(148, 163, 184, 0.25),
        0 0 0 1px rgba(229, 231, 235, 0.9);
}

.card-record {
    border-top: 3px solid #f9a8d4;
}

.card-history {
    border-top: 3px solid #bfdbfe;
}

.card-statistics {
    border-top: 3px solid #c4b5fd;
}

.card-contact {
    border-top: 3px solid #6ee7b7;
}

.emotion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.emotion-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px 12px 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #374151;
    position: relative;
    overflow: hidden;
}

.emotion-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(148, 163, 184, 0.35);
    border-color: #f9a8d4;
    background: #fef2f2;
}

.emotion-btn.selected {
    background: linear-gradient(150deg, #fef2f2 0%, #fdf2ff 40%, #eff6ff 100%);
    border-color: #fb7185;
}

.emotion-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(254, 226, 226, 0.8), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease-out;
    z-index: -1;
}

.emotion-btn.selected::before {
    opacity: 1;
}

.emoji {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0% 0%, #fef3c7, #fee2e2, #e0f2fe);
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.5);
}

.emotion-label {
    font-size: 0.8rem;
    color: #9ca3af;
}

.emotion-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #4b5563;
}

.memo-section {
    margin-bottom: 25px;
}

.memo-section label {
    display: block;
    margin-bottom: 10px;
    color: #6b7280;
    font-weight: 500;
}

.memo-section textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    background-color: #ffffff;
    color: #111827;
}

.memo-section textarea:focus {
    outline: none;
    border-color: #fb7185;
    box-shadow: 0 0 0 1px rgba(249, 168, 212, 0.7);
}

.save-btn {
    width: 100%;
    padding: 15px 18px;
    background: linear-gradient(135deg, #fb7185 0%, #f973b7 40%, #fbbf24 100%);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 14px 30px rgba(248, 113, 113, 0.35);
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(248, 113, 113, 0.5);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.message.success {
    background: #dcfce7;
    color: #166534;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    background: #f9fafb;
    border-left: 3px solid #bfdbfe;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 14px;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateX(4px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-emotion {
    font-size: 1.2em;
    font-weight: 600;
    color: #4b5563;
}

.history-date {
    color: #9ca3af;
    font-size: 0.9em;
}

.history-memo {
    color: #4b5563;
    margin-top: 10px;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.empty-state .emoji {
    font-size: 3em;
    margin-bottom: 15px;
}

.statistics-chart {
    margin-top: 20px;
}

.stat-item {
    margin-bottom: 20px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.stat-bar-container {
    background: #f3f4f6;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
}

.stat-bar {
    background: linear-gradient(135deg, #bfdbfe 0%, #c4b5fd 40%, #f9a8d4 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: white;
    font-weight: 500;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    background-color: #ffffff;
    color: #111827;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 1px rgba(216, 180, 254, 0.7);
}

.loading {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
}

.site-footer {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 600px) {
    .emotion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-section {
        padding-top: 24px;
    }

    .nav-inner {
        padding-inline: 12px;
    }

    .main-nav {
        display: none;
    }
}
