/* assets/css/common.css */
:root {
    --primary-green: #2ecc71;
    --primary-red: #e74c3c;
    --primary-blue: #3498db;
    --accent-purple: #9b59b6;
    --background-white: #ffffff;
    --text-color: #333333;
    --text-muted: #888888;
    --sidebar-bg: #f8f9fa;
    --border-color: #eeeeee;
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-strong: 0 10px 30px rgba(0,0,0,0.12);
}

/* Base Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Outfit', 'Segoe UI', sans-serif;
    background-color: var(--background-white);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   CustomUI 共通基盤 - プレミアム・ガラスモルフィズム
   ============================================================ */

/* 1. ローディング・オーバーレイ */
.custom-loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none; justify-content: center; align-items: center;
    flex-direction: column;
    animation: fadeInUI 0.3s ease-out;
}

.custom-loading-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: popInUI 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.custom-loading-spinner {
    width: 60px; height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-green);
    border-radius: 50%;
    animation: spinUI 1s linear infinite;
    margin-bottom: 20px;
}

#custom-loading-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
}

.custom-loading-cancel-btn {
    margin-top: 25px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.custom-loading-cancel-btn:hover { background: #f8f9fa; border-color: #ccc; }

/* 2. 確認・アラートモーダル (menu.cssからも参照されるが、こちらを正装とする) */
.custom-confirm-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 10000;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeInUI 0.2s ease-out;
}

.custom-confirm-modal {
    background: var(--background-white);
    width: 90%; max-width: 420px;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popInUI 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.custom-confirm-header {
    padding: 28px 28px 12px;
    display: flex; align-items: center; gap: 15px;
}
.custom-confirm-header span { font-size: 2rem; }
.custom-confirm-header h3 { margin: 0; font-size: 1.4rem; font-weight: 850; color: #1a1a1a; }

.custom-confirm-body {
    padding: 0 28px 32px;
    font-size: 1.05rem; color: #4b5563; line-height: 1.6;
}

.custom-confirm-footer {
    padding: 20px 28px;
    background: #fafafa;
    display: flex; justify-content: flex-end; gap: 12px;
    border-top: 1px solid #f0f0f0;
}

.custom-confirm-btn {
    padding: 14px 28px; border: none; border-radius: 14px;
    font-size: 1rem; font-weight: 750; cursor: pointer;
    transition: all 0.2s;
}
.custom-confirm-btn-ok { 
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    color: white; 
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.custom-confirm-btn-cancel { background: #eee; color: #555; }

/* アニメーション定義 */
@keyframes spinUI { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeInUI { from { opacity: 0; } to { opacity: 1; } }
@keyframes popInUI { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* モバイル対応の微調整 */
@media (max-width: 480px) {
    .custom-confirm-modal { width: 94%; }
    .custom-confirm-footer { flex-direction: column-reverse; }
    .custom-confirm-btn { width: 100%; }
}

/* ============================================================
   3. マニュアルリンク & アプリ説明文セクション (共通スタイル)
   ============================================================ */
.manual-link-section {
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    padding: 0 10px;
}

.btn-manual-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary-green, #2ecc71);
}

.btn-manual-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-green, #2ecc71);
    background: #fff;
    color: var(--primary-green, #2ecc71);
}

.btn-manual-link .icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-manual-link:hover .icon {
    transform: rotate(-10deg) scale(1.2);
}

.description-section {
    width: 94%;
    max-width: 1000px;
    margin: 40px auto;
    text-align: left;
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-green, #2ecc71);
}

.description-section h2 {
    font-size: 1.2rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.description-section h3 {
    margin-top: 30px;
    color: var(--primary-green, #2ecc71);
    font-size: 1.1rem;
    border-left: 4px solid var(--primary-green, #2ecc71);
    padding-left: 10px;
    margin-bottom: 15px;
}

.description-section p {
    margin-bottom: 15px;
}

.description-section ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.description-section li {
    margin-bottom: 8px;
}

.description-section strong {
    color: #2c3e50;
}

.description-section ul.check-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.description-section ul.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.description-section ul.check-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: -1px;
    font-size: 14px;
}

.description-section .feature-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.description-section .feature-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1rem;
}

.description-section .feature-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* 4. ポイント獲得モーダル (CustomUI.showPointsEarned) */
.custom-earn-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 10005;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeInUI 0.3s ease-out;
}

.custom-earn-modal {
    background: var(--background-white);
    width: 90%; max-width: 440px;
    border-radius: 32px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    padding: 35px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: popInEarn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-earn-modal.type-bonus {
    border: 2px solid #ffd700;
}

/* 星のキラキラアニメーション */
.earn-star {
    position: absolute;
    font-size: 1.2rem;
    pointer-events: none;
    animation: starFloat 3s ease-in-out infinite;
    opacity: 0;
}

.earn-emoji-header {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: inline-block;
    animation: bounceEmoji 1.5s ease-in-out infinite alternate;
}

.earn-title {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    font-weight: 850;
    color: #1a1a1a;
}

.earn-desc {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.earn-points-value-container {
    margin: 20px 0 25px 0;
}

.earn-points-value {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: pulsePoints 2s ease-in-out infinite;
}

.custom-earn-modal.type-bonus .earn-points-value {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-earn-btn-ok {
    width: 100%;
    padding: 16px 28px;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 750;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    color: white;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-earn-btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(46, 204, 113, 0.4);
}

.custom-earn-btn-ok:active {
    transform: translateY(1px);
}

.custom-earn-modal.type-bonus .custom-earn-btn-ok {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.custom-earn-modal.type-bonus .custom-earn-btn-ok:hover {
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.55);
}

/* アニメーション */
@keyframes popInEarn {
    0% { transform: scale(0.85); opacity: 0; }
    70% { transform: scale(1.03); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulsePoints {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounceEmoji {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes starFloat {
    0% { transform: translateY(10px) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-30px) rotate(180deg); opacity: 0; }
}

