/* ==========================================
   基本設定
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* カラーパレット - 優しく温かい色合い（緑・オレンジ基調） */
    --primary-color: #8FBC8F;
    --primary-light: #A8D5A8;
    --primary-dark: #6B9B6B;
    --secondary-color: #FFB366;
    --secondary-light: #FFD4A3;
    --accent-color: #F4A460;
    --success-color: #98D8C8;
    --warm-yellow: #FFE5B4;
    --soft-green: #C8E6C9;
    
    /* ニュートラルカラー */
    --text-primary: #4A5568;
    --text-secondary: #718096;
    --text-light: #A0AEC0;
    --bg-primary: #FFF8F0;
    --bg-secondary: #FFF4E6;
    --bg-card: #FFFFFF;
    --border-color: #E8DED0;
    
    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(143, 188, 143, 0.12);
    --shadow-md: 0 4px 16px rgba(143, 188, 143, 0.18);
    --shadow-lg: 0 8px 32px rgba(143, 188, 143, 0.24);
    
    /* フォント */
    --font-primary: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --font-secondary: 'Noto Sans JP', sans-serif;
    
    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* ボーダーラディウス */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================
   背景装飾
========================================== */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--soft-green), var(--success-color));
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--warm-yellow), var(--secondary-light));
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

/* ==========================================
   コンテナ
========================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* ==========================================
   ヘッダー
========================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

.header-icon i {
    font-size: 2.5rem;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-md);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-lg);
    }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.02em;
}

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

/* ==========================================
   ウェルカムカード
========================================== */
.welcome-card {
    background: linear-gradient(135deg, var(--bg-card), var(--warm-yellow));
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(0%, 0%);
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

.welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.welcome-icon i {
    font-size: 1.5rem;
    color: white;
}

.welcome-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* ==========================================
   フォームセクション
========================================== */
.form-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.section-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    padding-left: 56px;
}

/* ==========================================
   フォームグループ
========================================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.form-label i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(143, 188, 143, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================
   チェックボックスグループ
========================================== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: white;
    border-color: var(--soft-green);
}

.checkbox-input {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: var(--spacing-md);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-input:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
}

.checkbox-input:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.checkbox-label span {
    color: var(--text-primary);
    font-size: 1rem;
}

/* ==========================================
   ニーズグリッド
========================================== */
.needs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.need-card {
    position: relative;
    cursor: pointer;
}

.need-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.need-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    height: 100%;
}

.need-content i {
    font-size: 2rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.need-content span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.need-card:hover .need-content {
    background: white;
    border-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.need-card input[type="radio"]:checked + .need-content {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.need-card input[type="radio"]:checked + .need-content i,
.need-card input[type="radio"]:checked + .need-content span {
    color: white;
}

/* ==========================================
   ボタン
========================================== */
.button-group {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 200px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--soft-green);
}

/* ==========================================
   記録セクション
========================================== */
.records-section {
    margin-top: var(--spacing-xl);
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.record-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.record-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.record-date {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.record-mood {
    display: inline-flex;
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, var(--secondary-light), var(--warm-yellow));
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.record-preview {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.record-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.record-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.record-btn-view {
    background: var(--soft-green);
    color: var(--text-primary);
}

.record-btn-delete {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.record-btn:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

/* ==========================================
   励ましカード
========================================== */
.encouragement-card {
    background: linear-gradient(135deg, var(--soft-green), var(--warm-yellow));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.encouragement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
}

.encouragement-icon i {
    font-size: 1.8rem;
    color: white;
}

.encouragement-text {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-primary);
    font-weight: 500;
}

/* ==========================================
   フッター
========================================== */
.footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    color: var(--text-light);
}

.footer p {
    margin-bottom: var(--spacing-xs);
}

.footer-note {
    font-size: 0.9rem;
    font-style: italic;
}

/* ==========================================
   モーダル
========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success-color), var(--soft-green));
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
}

.modal-icon i {
    font-size: 2.5rem;
    color: white;
}

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

.modal-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

/* ==========================================
   レスポンシブデザイン
========================================== */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .section-description {
        padding-left: 0;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        min-width: 100%;
    }

    .needs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-icon {
        width: 60px;
        height: 60px;
    }

    .header-icon i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
    }

    .section-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .form-section {
        padding: var(--spacing-md);
    }

    .needs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   印刷スタイル
========================================== */
@media print {
    .background-decoration,
    .button-group,
    .record-actions {
        display: none;
    }

    .form-section {
        page-break-inside: avoid;
    }
}
