/* フィッツコイン交換画面専用スタイル */

/* ヘッダー */
.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.filter-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* フィッツコイン残高表示 */
.point-balance-section {
    background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
    padding: 20px;
    color: white;
}

.current-points {
    text-align: center;
}

.points-label {
    font-size: 14px;
    opacity: 0.9;
    display: block;
    margin-bottom: 8px;
}

.points-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.points-icon {
    font-size: 28px;
}

.points-amount {
    font-size: 36px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.points-unit {
    font-size: 18px;
    opacity: 0.9;
}

/* カテゴリータブ */
.category-section {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 56px;
    z-index: 50;
}

.category-tabs {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.category-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-tab:hover {
    color: #2196F3;
}

.category-tab.active {
    color: #2196F3;
    font-weight: bold;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2196F3;
    border-radius: 3px 3px 0 0;
}

/* 交換アイテムリスト */
.exchange-items {
    padding: 16px;
    background: #f5f7fa;
    min-height: calc(100vh - 300px);
}

.item-category {
    display: none;
}

.item-category.active {
    display: block;
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.exchange-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exchange-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.exchange-item.locked {
    opacity: 0.6;
    background: #f5f5f5;
}

.exchange-item.owned {
    background: #e8f5e9;
}

/* アイテムプレビュー */
.item-preview {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* アバターフレーム */
.avatar-frame {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.avatar-frame .preview-text {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #2196F3;
}

.frame-gold {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.frame-rainbow {
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 200% 200%;
    animation: rainbow 3s ease-in-out infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.frame-fire {
    background: linear-gradient(45deg, #ff4444, #ff8800);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    position: relative;
}

.frame-fire::before {
    content: '🔥';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 20px;
}

.frame-simple {
    background: #2196F3;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

.frame-ice {
    background: linear-gradient(45deg, #00bcd4, #b2ebf2);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5);
}

.frame-nature {
    background: linear-gradient(45deg, #4caf50, #81c784);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.frame-neon {
    background: linear-gradient(45deg, #e91e63, #f06292, #e91e63);
    box-shadow: 0 0 25px rgba(233, 30, 99, 0.7);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(233, 30, 99, 0.7); }
    50% { box-shadow: 0 0 35px rgba(233, 30, 99, 0.9); }
}

.frame-galaxy {
    background: linear-gradient(45deg, #311b92, #7c4dff, #b388ff);
    box-shadow: 0 0 30px rgba(124, 77, 255, 0.6);
    position: relative;
}

.frame-galaxy::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* バッジプレビュー */
.badge-preview {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 16px;
}

.badge-icon {
    font-size: 48px;
    display: block;
}

/* カテゴリー説明 */
.category-description {
    font-size: 12px;
    color: #666;
    margin: -8px 0 16px 0;
}

/* プロフィールプレビュー */
.profile-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 12px;
}

.profile-preview.locked {
    opacity: 0.5;
}

.preview-name {
    font-weight: bold;
    color: #333;
}

.preview-badge {
    font-size: 16px;
}

/* テーマプレビュー */
.theme-preview {
    width: 100%;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
}

.theme-sample {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sample-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.sample-title {
    font-size: 12px;
}

.sample-icons {
    display: flex;
    gap: 4px;
    font-size: 10px;
}

.sample-content {
    flex: 1;
    background: white;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sample-button {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

/* テーマごとの色設定 */
.theme-ocean .sample-header {
    background: linear-gradient(180deg, #0077be 0%, #00a8e8 100%);
}

.theme-ocean .sample-button {
    background: #0077be;
}

.theme-sunset .sample-header {
    background: linear-gradient(180deg, #ff6b6b 0%, #ff9068 100%);
}

.theme-sunset .sample-button {
    background: #ff6b6b;
}

.theme-forest .sample-header {
    background: linear-gradient(180deg, #2d6a4f 0%, #52b788 100%);
}

.theme-forest .sample-button {
    background: #2d6a4f;
}

.theme-default .sample-header {
    background: linear-gradient(180deg, #2196F3 0%, #42A5F5 100%);
}

.theme-default .sample-button {
    background: #2196F3;
}

/* 季節テーマ */
.theme-spring .sample-header {
    background: linear-gradient(180deg, #ff69b4 0%, #ffc0cb 100%);
}

.theme-spring .sample-button {
    background: #ff69b4;
}

.theme-summer .sample-header {
    background: linear-gradient(180deg, #00bfff 0%, #87ceeb 100%);
}

.theme-summer .sample-button {
    background: #00bfff;
}

.theme-autumn .sample-header {
    background: linear-gradient(180deg, #d2691e 0%, #ff8c00 100%);
}

.theme-autumn .sample-button {
    background: #d2691e;
}

.theme-winter .sample-header {
    background: linear-gradient(180deg, #4682b4 0%, #b0c4de 100%);
}

.theme-winter .sample-button {
    background: #4682b4;
}

/* イベントテーマ */
.theme-halloween .sample-header {
    background: linear-gradient(180deg, #ff6600 0%, #663399 100%);
}

.theme-halloween .sample-button {
    background: #ff6600;
}

.theme-christmas .sample-header {
    background: linear-gradient(180deg, #dc143c 0%, #228b22 100%);
}

.theme-christmas .sample-button {
    background: #dc143c;
}

.theme-newyear .sample-header {
    background: linear-gradient(180deg, #dc143c 0%, #ffd700 100%);
}

.theme-newyear .sample-button {
    background: #dc143c;
}

.theme-valentine .sample-header {
    background: linear-gradient(180deg, #ff1493 0%, #ffb6c1 100%);
}

.theme-valentine .sample-button {
    background: #ff1493;
}

/* 称号プレビュー */
.title-preview {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.title-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: block;
}

/* アイテム情報 */
.item-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.item-description {
    font-size: 11px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.item-cost {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin: 8px 0;
}

.cost-amount {
    font-size: 20px;
    font-weight: bold;
    color: #2196F3;
}

.cost-unit {
    font-size: 12px;
    color: #2196F3;
}

.owned-label {
    font-size: 14px;
    color: #4CAF50;
    font-weight: bold;
}

/* 交換ボタン */
.exchange-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.exchange-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

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

.exchange-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.exchange-btn.selected {
    background: #4CAF50;
}

/* レスポンシブ対応 */
@media (max-width: 320px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .points-amount {
        font-size: 28px;
    }
}

/* スクロールバー */
.exchange-items {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.exchange-items::-webkit-scrollbar {
    width: 8px;
}

.exchange-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.exchange-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.exchange-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}