/**
 * Myst Echo - マイページ・その他スタイル
 */

.myst-echo-mypage,
.myst-echo-card-creator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* タブ */
.myst-echo-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 30px;
}

.tab-button {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #333;
    background: #f5f5f5;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ダッシュボード */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    opacity: 0.9;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

.stat-meta {
    font-size: 14px;
    opacity: 0.8;
}

/* カードセット一覧 */
.card-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-set-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-set-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-set-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-set-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 20px;
}

.card-set-item p {
    padding: 0 15px;
    color: #666;
}

.card-set-meta {
    padding: 10px 15px;
    font-size: 14px;
    color: #999;
}

.card-set-meta .category {
    background: #667eea;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    margin-right: 10px;
}

.card-set-actions {
    padding: 15px;
    display: flex;
    gap: 10px;
}

/* 引き履歴 */
.draws-list,
.draws-list-full {
    margin-top: 20px;
}

.draw-item,
.draw-item-full {
    display: flex;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.draw-item img,
.draw-item-full img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.draw-info,
.draw-info-full {
    flex: 1;
}

.draw-info h4,
.draw-info-full h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.draw-date {
    color: #999;
    font-size: 14px;
    margin-bottom: 5px;
}

.draw-set {
    color: #667eea;
    font-size: 14px;
}

.draw-message {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    font-style: italic;
}

.draw-memo {
    margin-top: 10px;
    padding: 10px;
    background: #fff9e6;
    border-radius: 5px;
    font-size: 14px;
}

/* フォーム */
.myst-echo-create-set-form,
.myst-echo-add-card-modal {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
}

.myst-echo-button-small {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.myst-echo-button-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* モーダル */
.myst-echo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.myst-echo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

/* 決済管理 */
.active-plan-info {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #667eea;
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.payment-history-table th,
.payment-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.payment-history-table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .myst-echo-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .card-sets-grid {
        grid-template-columns: 1fr;
    }
    
    .draw-item,
    .draw-item-full {
        flex-direction: column;
        text-align: center;
    }
    
    .draw-item img,
    .draw-item-full img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

