/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
}

/* 認証セクション（超シンプル） */
.auth-section {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ログイン後の認証セクション（最小化） */
.auth-section.logged-in {
    margin-top: 5px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.auth-form {
    text-align: center;
}

.auth-description {
    color: #718096;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

/* Googleログインボタン（超シンプル） */
.google-login-btn {
    width: 100%;
    max-width: 200px;
    padding: 8px 12px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.google-login-btn:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-icon {
    width: 16px;
    height: 16px;
    background: white;
    color: #4285f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}


/* ユーザー情報（超シンプル） */
.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ログイン後のユーザー情報（最小化） */
.auth-section.logged-in .user-info {
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.user-info span {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.85rem;
}

/* ログイン後のユーザー情報テキスト（最小化） */
.auth-section.logged-in .user-info span {
    font-size: 0.75rem;
}

.user-info button {
    padding: 4px 8px;
    border: 1px solid #fed7d7;
    background: transparent;
    color: #c53030;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* ログイン後のユーザー情報ボタン（最小化） */
.auth-section.logged-in .user-info button {
    padding: 2px 6px;
    font-size: 0.7rem;
}

.user-info button:hover {
    background: #fed7d7;
    transform: translateY(-1px);
}

/* 削除リストセクション */
.delete-list-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.delete-list-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.delete-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.delete-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.delete-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delete-item-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.delete-item-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
}

.delete-item-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.delete-item-status.completed {
    background: #f0fff4;
    color: #68d391;
}

.delete-item-status.pending {
    background: #fef5e7;
    color: #ed8936;
}

.delete-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.delete-actions button {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delete-actions button:hover {
    border-color: #667eea;
    color: #667eea;
}

.delete-actions button.danger {
    border-color: #fed7d7;
    color: #c53030;
}

.delete-actions button.danger:hover {
    background: #fed7d7;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .auth-section {
        padding: 8px;
    }
    
    .google-login-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .delete-list-section {
        padding: 15px;
    }
    
    .delete-actions {
        flex-direction: column;
    }
}

/* メインコンテンツ */
main {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* メインヘッダー */
.main-header {
    text-align: center;
    margin-bottom: 30px;
}

.main-header h1 {
    font-size: 1.875rem; /* 2.5rem * 0.75 = 1.875rem (25%小さく) */
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 700;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.add-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

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

/* アイテム追加セクション */
.add-item-section {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#itemInput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#itemInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#addButton {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#addButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#addButton:active {
    transform: translateY(0);
}

/* フィルターセクション */
.filter-section {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 統計情報 */
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.stats span {
    font-weight: 600;
    color: #4a5568;
}

/* 買い物リスト */
.shopping-list {
    list-style: none;
    margin-bottom: 25px;
}

.shopping-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.shopping-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shopping-item.completed {
    opacity: 0.7;
    background: #f0fff4;
}

.shopping-item.completed .item-text {
    text-decoration: line-through;
    color: #68d391;
}

.item-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.item-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
}

.delete-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #feb2b2;
    transform: scale(1.05);
}

/* アクションボタン */
.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.action-btn.danger {
    border-color: #fed7d7;
    color: #c53030;
}

.action-btn.danger:hover {
    background: #fed7d7;
}

/* フッター */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    color: #718096;
}

/* アニメーション */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .add-item-section {
        flex-direction: column;
    }
    
    .filter-section {
        flex-wrap: wrap;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .actions {
        flex-direction: column;
    }
}

/* 空の状態 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

.empty-state p {
    font-size: 0.9rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-body {
    padding: 24px;
}

.modal-body input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-body input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 0 0 12px 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-1px);
}

/* 横長の追加ボタン */
.horizontal-add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.2);
}

.horizontal-add-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.3);
}

.horizontal-add-btn .btn-icon {
    font-size: 1.3rem;
    font-weight: bold;
}

/* 削除ボタンコンテナ */
.delete-button-container {
    margin-top: 30px;
    text-align: center;
}

.delete-selected-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #e2e8f0;
    color: #718096;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.delete-selected-btn.active {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

.delete-selected-btn.active:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.delete-selected-btn .btn-icon {
    font-size: 1.2rem;
}

/* アイテムの日付表示 */
.item-date {
    font-size: 0.75rem;
    color: #718096;
    margin-left: auto;
    font-weight: 400;
    opacity: 0.8;
}

.shopping-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
