/**
 * Myst Echo - カード作成ページ専用スタイル
 * 神秘的で高級感のあるデザイン - ウィザード形式
 */

/* ============================================
   WordPress Admin Bar の空白修正 & ボディスタイルリセット
   ============================================ */
/* カード作成ページでのbodyスタイルをリセット（最も高い優先度で） */
/* すべてのbodyタグに対して、カード作成ページの場合は3D変換を無効化 */
html body .myst-echo-card-creator-wrapper,
html body.page .myst-echo-card-creator-wrapper,
html body.single .myst-echo-card-creator-wrapper,
html body.home .myst-echo-card-creator-wrapper {
    /* 3D変換を無効化 - 親要素からの継承を防ぐ */
    perspective: none !important;
    -webkit-perspective: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
    transform: none !important;
    /* 親要素からの継承を完全に阻止 */
    isolation: isolate;
    padding: 0 !important;
    margin: 0 !important;
}

html body.admin-bar.page .myst-echo-card-creator-wrapper,
html body.admin-bar.single .myst-echo-card-creator-wrapper,
html body.admin-bar.home .myst-echo-card-creator-wrapper,
html body.admin-bar .myst-echo-card-creator-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html body.admin-bar.page .myst-echo-card-creator,
html body.admin-bar.single .myst-echo-card-creator,
html body.admin-bar.home .myst-echo-card-creator,
html body.admin-bar .myst-echo-card-creator {
    padding-top: 32px;
}

/* ============================================
   基本レイアウト
   ============================================ */
.myst-echo-card-creator-wrapper {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0514;
    padding: 0;
    margin: 0;
    /* 3D変換を完全に無効化 */
    transform: none !important;
    -webkit-transform: none !important;
    perspective: none !important;
    -webkit-perspective: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
    /* 親要素からの継承を阻止 */
    isolation: isolate;
}

.myst-echo-card-creator-wrapper > .myst-echo-card-creator {
    padding: 60px 20px;
}

.myst-echo-card-creator {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    /* 3D変換を完全に無効化 */
    transform: none !important;
    -webkit-transform: none !important;
    perspective: none !important;
    -webkit-perspective: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
}

/* ============================================
   神秘的背景エフェクト
   ============================================ */
.mystical-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(75, 0, 130, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(147, 112, 219, 0.15) 0%, transparent 70%);
    animation: overlayPulse 8s ease-in-out infinite, hueRotate 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes overlayPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes hueRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.mystical-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(138, 43, 226, 0.5), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 80px 10px, rgba(147, 112, 219, 0.4), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 120px 80px, rgba(138, 43, 226, 0.4), transparent),
        radial-gradient(2px 2px at 150px 20px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 10px 90px, rgba(147, 112, 219, 0.3), transparent),
        radial-gradient(2px 2px at 70px 10px, rgba(138, 43, 226, 0.6), transparent),
        radial-gradient(1px 1px at 110px 60px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 30px 50px, rgba(147, 112, 219, 0.5), transparent),
        radial-gradient(1px 1px at 100px 30px, rgba(138, 43, 226, 0.3), transparent);
    background-size: 300% 300%;
    animation: particleFloat 40s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% { background-position: 0% 0%; }
    33% { background-position: 100% 50%; }
    66% { background-position: 50% 100%; }
}

/* 背景エフェクトのtransformがページ全体に影響しないように */
.mystical-particles {
    transform: none !important;
    -webkit-transform: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
}

/* particleZoomアニメーション（transformを使わないバージョン） */
@keyframes particleZoom {
    0%, 100% { 
        background-size: 300% 300%;
        opacity: 1;
    }
    50% { 
        background-size: 310% 310%;
        opacity: 0.9;
    }
}

.mystical-light-rays {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    margin-left: -75%;
    margin-top: -75%;
    background: 
        conic-gradient(from 0deg at 50% 50%, transparent 0%, rgba(138, 43, 226, 0.15) 30deg, transparent 60deg),
        conic-gradient(from 72deg at 50% 50%, transparent 0%, rgba(75, 0, 130, 0.15) 30deg, transparent 60deg),
        conic-gradient(from 144deg at 50% 50%, transparent 0%, rgba(147, 112, 219, 0.15) 30deg, transparent 60deg),
        conic-gradient(from 216deg at 50% 50%, transparent 0%, rgba(138, 43, 226, 0.15) 30deg, transparent 60deg),
        conic-gradient(from 288deg at 50% 50%, transparent 0%, rgba(75, 0, 130, 0.15) 30deg, transparent 60deg);
    animation: lightRotate 60s linear infinite, lightPulse 10s ease-in-out infinite;
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
    transform-origin: center center;
}

@keyframes lightRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* コンテンツが回転しないように全要素に明示的に設定 */
.myst-echo-card-creator-wrapper * {
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
}

/* コンテンツ要素のtransformをリセット（背景エフェクトを除く） */
.myst-echo-card-creator-wrapper > *:not(.mystical-bg-overlay):not(.mystical-particles):not(.mystical-light-rays),
.myst-echo-card-creator-wrapper .myst-echo-card-creator,
.myst-echo-card-creator-wrapper .myst-echo-card-creator > * {
    transform: none !important;
    -webkit-transform: none !important;
    transform-style: flat !important;
    -webkit-transform-style: flat !important;
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ============================================
   ヘッダー
   ============================================ */
.creator-header {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    z-index: 1;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -300px;
    margin-top: -300px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.4) 0%, transparent 70%);
    filter: blur(80px);
    animation: glowPulse 5s ease-in-out infinite;
    z-index: -1;
    transform-origin: center center;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes containerPulse {
    0%, 100% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.7),
            0 0 100px rgba(138, 43, 226, 0.5);
    }
    50% { 
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.8),
            0 0 120px rgba(138, 43, 226, 0.7);
    }
}

.mystical-title {
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    text-shadow: 
        0 0 25px rgba(138, 43, 226, 0.9),
        0 0 50px rgba(147, 112, 219, 0.7),
        0 0 75px rgba(138, 43, 226, 0.5),
        0 0 100px rgba(147, 112, 219, 0.3),
        0 0 120px rgba(138, 43, 226, 0.2);
    position: relative;
    z-index: 1;
}

.title-icon {
    font-size: 64px;
    animation: iconFloat 3s ease-in-out infinite, iconRotate 10s linear infinite, iconGlow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 1));
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes iconRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes iconGlow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.8; filter: brightness(1.3); }
}

.title-text {
    background: linear-gradient(135deg, #fff 0%, #dda0dd 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: textShine 3s ease infinite, titleShimmer 2s infinite;
}

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

@keyframes titleShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.header-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
}

/* ============================================
   セクション
   ============================================ */
.creator-form-section {
    position: relative;
    margin-bottom: 60px;
}

.section-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    animation: sectionGlowPulse 6s ease-in-out infinite;
    z-index: -1;
    transform-origin: center center;
}

@keyframes sectionGlowPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ============================================
   ウィザード形式
   ============================================ */
.wizard-container {
    position: relative;
    background: 
        linear-gradient(135deg, rgba(20, 15, 35, 0.95) 0%, rgba(30, 20, 50, 0.9) 100%),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 70%);
    backdrop-filter: blur(35px) saturate(180%);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 100px rgba(138, 43, 226, 0.5),
        inset 0 0 120px rgba(138, 43, 226, 0.15);
    z-index: 1;
    animation: containerPulse 6s ease-in-out infinite;
}

.wizard-header {
    text-align: center;
    margin-bottom: 50px;
}

.wizard-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    text-shadow: 
        0 0 10px rgba(138, 43, 226, 1),
        0 0 20px rgba(138, 43, 226, 0.95),
        0 0 40px rgba(147, 112, 219, 0.8),
        0 0 60px rgba(138, 43, 226, 0.6);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.wizard-title .title-icon {
    font-size: 42px;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 1));
}

.wizard-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* プログレスバー */
.wizard-progress {
    position: relative;
    margin-bottom: 50px;
    padding: 20px 0;
}

.progress-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(138, 43, 226, 0.2);
    border-radius: 2px;
    margin-top: -2px;
    z-index: 1;
}

.progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.9) 0%, rgba(147, 112, 219, 0.9) 100%);
    border-radius: 2px;
    margin-top: -2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
}

.progress-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-step:hover {
    transform: translateY(-3px);
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(20, 15, 35, 0.8);
    border: 3px solid rgba(138, 43, 226, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.step-circle .step-number {
    position: absolute;
    transition: all 0.4s ease;
}

.step-circle .step-check {
    position: absolute;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    font-size: 28px;
}

.progress-step.active .step-circle {
    border-color: rgba(138, 43, 226, 1);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4) 0%, rgba(147, 112, 219, 0.3) 100%);
    color: #fff;
    box-shadow: 
        0 0 30px rgba(138, 43, 226, 0.8),
        inset 0 0 20px rgba(138, 43, 226, 0.2);
    transform: scale(1.15);
}

.progress-step.completed .step-circle {
    border-color: rgba(138, 43, 226, 1);
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.6) 0%, rgba(147, 112, 219, 0.5) 100%);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.7);
}

.progress-step.completed .step-number {
    opacity: 0;
    transform: scale(0);
}

.progress-step.completed .step-check {
    opacity: 1;
    transform: scale(1);
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
}

/* ウィザードステップ */
.wizard-form {
    position: relative;
}

.wizard-steps-container {
    position: relative;
    min-height: 500px;
}

.wizard-step {
    display: none;
    animation: stepFadeIn 0.5s ease-out;
}

.wizard-step.active {
    display: block;
}

.wizard-step.fade-out {
    animation: stepFadeOut 0.3s ease-in;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes stepFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.step-content {
    padding: 30px;
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.8));
    animation: stepIconFloat 3s ease-in-out infinite;
}

@keyframes stepIconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.step-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-shadow: 
        0 0 10px rgba(138, 43, 226, 0.9),
        0 0 20px rgba(147, 112, 219, 0.7);
    margin-bottom: 15px;
}

.step-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.step-body {
    max-width: 700px;
    margin: 0 auto;
}

.optional-mark {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: normal;
    margin-left: 5px;
}

.upload-hint {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    font-style: italic;
}

.wizard-upload-area {
    min-height: 250px;
}

/* 確認画面 */
.wizard-review {
    max-width: 600px;
    margin: 0 auto;
}

.review-item {
    padding: 25px;
    margin-bottom: 20px;
    background: rgba(10, 5, 20, 0.5);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.review-item:hover {
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    transform: translateX(5px);
}

.review-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.review-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 5px rgba(138, 43, 226, 0.6));
}

.review-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    word-break: break-word;
}

.review-preview-image {
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(138, 43, 226, 0.4);
}

.review-preview-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
}

/* ウィザードナビゲーション */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
}

.wizard-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 35px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    letter-spacing: 1px;
    z-index: 1;
    min-width: 150px;
}

.wizard-btn-primary {
    background: 
        linear-gradient(135deg, rgba(138, 43, 226, 0.95) 0%, rgba(75, 0, 130, 0.95) 50%, rgba(147, 112, 219, 0.9) 100%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    box-shadow: 
        0 8px 30px rgba(138, 43, 226, 0.6),
        0 0 80px rgba(138, 43, 226, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.wizard-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 50px rgba(138, 43, 226, 0.8),
        0 0 120px rgba(138, 43, 226, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.wizard-btn-secondary {
    background: rgba(138, 43, 226, 0.2);
    border: 2px solid rgba(138, 43, 226, 0.4);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

.wizard-btn-secondary:hover {
    background: rgba(138, 43, 226, 0.3);
    border-color: rgba(138, 43, 226, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.wizard-btn .btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.wizard-btn:hover .btn-icon {
    transform: scale(1.2);
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.wizard-btn-submit {
    background: 
        linear-gradient(135deg, rgba(138, 43, 226, 1) 0%, rgba(75, 0, 130, 1) 50%, rgba(147, 112, 219, 0.95) 100%);
    box-shadow: 
        0 10px 40px rgba(138, 43, 226, 0.7),
        0 0 100px rgba(138, 43, 226, 0.5);
    animation: submitPulse 2s ease-in-out infinite;
}

@keyframes submitPulse {
    0%, 100% { 
        box-shadow: 
            0 10px 40px rgba(138, 43, 226, 0.7),
            0 0 100px rgba(138, 43, 226, 0.5);
    }
    50% { 
        box-shadow: 
            0 15px 50px rgba(138, 43, 226, 0.9),
            0 0 120px rgba(138, 43, 226, 0.7);
    }
}

/* ============================================
   フォーム要素
   ============================================ */
.mystical-form-group {
    margin-bottom: 30px;
}

.mystical-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.label-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 5px rgba(138, 43, 226, 0.6));
}

.required-mark {
    color: #ff6b6b;
    margin-left: 5px;
}

.input-wrapper,
.select-wrapper {
    position: relative;
}

.mystical-input,
.mystical-textarea,
.mystical-select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 5, 20, 0.7);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mystical-input:focus,
.mystical-textarea:focus,
.mystical-select:focus {
    outline: none;
    border-color: rgba(138, 43, 226, 1);
    box-shadow: 
        0 0 30px rgba(138, 43, 226, 0.6),
        inset 0 0 30px rgba(138, 43, 226, 0.2);
    background: rgba(10, 5, 20, 0.9);
}

.mystical-textarea {
    resize: vertical;
    min-height: 120px;
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    margin-top: -8px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    line-height: 1;
}

.mystical-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mystical-input:focus ~ .input-glow,
.mystical-textarea:focus ~ .input-glow {
    opacity: 1;
}

.field-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    font-style: italic;
}

/* ============================================
   ファイルアップロード
   ============================================ */
.file-upload-wrapper {
    position: relative;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload-area {
    position: relative;
    padding: 60px 40px;
    background: rgba(10, 5, 20, 0.5);
    border: 2px dashed rgba(138, 43, 226, 0.4);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: rgba(138, 43, 226, 0.8);
    background: rgba(10, 5, 20, 0.7);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.6));
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-main-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.upload-sub-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.upload-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.file-upload-area:hover .upload-glow {
    opacity: 1;
}

.image-preview {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(138, 43, 226, 0.4);
    display: none;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .preview-overlay {
    opacity: 1;
}

.preview-remove {
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-remove:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

/* ============================================
   カードセット一覧
   ============================================ */
.card-sets-section {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 
        0 0 15px rgba(138, 43, 226, 0.8),
        0 0 30px rgba(147, 112, 219, 0.6);
}

.title-decoration {
    font-size: 24px;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.6));
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(10, 5, 20, 0.5);
    border: 2px dashed rgba(138, 43, 226, 0.3);
    border-radius: 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.6));
}

.empty-text {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.empty-subtext {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.mystical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card-set-item {
    position: relative;
    background: rgba(10, 5, 20, 0.7);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-set-item:hover {
    border-color: rgba(138, 43, 226, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.4);
}

.card-set-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-set-item:hover .card-set-glow {
    opacity: 1;
}

.card-set-inner {
    position: relative;
    z-index: 1;
}

.card-set-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(138, 43, 226, 0.1);
}

.placeholder-icon {
    font-size: 64px;
    opacity: 0.5;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.card-set-content {
    padding: 25px;
}

.card-set-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.card-set-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    line-height: 1.6;
}

.card-set-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    padding: 6px 12px;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    font-size: 13px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.count-icon {
    font-size: 14px;
}

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

.action-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: rgba(138, 43, 226, 0.2);
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(138, 43, 226, 0.4);
    border-color: rgba(138, 43, 226, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.4);
}

.btn-icon {
    font-size: 16px;
}

/* ============================================
   モーダル
   ============================================ */
.mystical-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mystical-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: 
        linear-gradient(135deg, rgba(20, 15, 35, 0.95) 0%, rgba(30, 20, 50, 0.9) 100%),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 70%);
    backdrop-filter: blur(35px) saturate(180%);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 25px;
    box-shadow: 
        0 10px 50px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(138, 43, 226, 0.5);
    overflow: hidden;
    z-index: 1;
    animation: modalSlideIn 0.4s ease-out;
}

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

.modal-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -60%;
    margin-top: -60%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.8);
}

.close-modal {
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.4);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    background: rgba(255, 107, 107, 0.4);
    border-color: rgba(255, 107, 107, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* タブ */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
}

.modal-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-tab-btn.active {
    color: #fff;
    border-bottom-color: rgba(138, 43, 226, 1);
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
}

.tab-content {
    display: none;
}

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

/* 一括アップロード */
.bulk-upload-wrapper {
    position: relative;
}

.bulk-upload-zone {
    position: relative;
    min-height: 300px;
    padding: 60px 40px;
    background: rgba(10, 5, 20, 0.5);
    border: 2px dashed rgba(138, 43, 226, 0.4);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.bulk-upload-zone:hover,
.bulk-upload-zone.dragover {
    border-color: rgba(138, 43, 226, 0.8);
    background: rgba(10, 5, 20, 0.7);
    transform: scale(1.02);
}

.bulk-upload-content {
    position: relative;
    z-index: 1;
}

.bulk-upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.6));
}

.bulk-upload-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-upload-main-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

.bulk-upload-sub-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.bulk-upload-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.bulk-upload-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bulk-upload-zone:hover .bulk-upload-glow {
    opacity: 1;
}

.bulk-files-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.bulk-file-item {
    position: relative;
    background: rgba(10, 5, 20, 0.7);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
}

.bulk-file-item:hover {
    border-color: rgba(138, 43, 226, 0.6);
    transform: translateY(-3px);
}

.file-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 107, 107, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.bulk-file-item:hover .file-remove {
    opacity: 1;
}

.file-remove:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

.file-name {
    font-size: 12px;
    color: #fff;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 4px;
    font-weight: 600;
}

.file-size {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* プログレスバー */
.bulk-upload-progress {
    margin-top: 30px;
    padding: 25px;
    background: rgba(10, 5, 20, 0.6);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-status-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
}

.progress-percentage {
    font-size: 20px;
    font-weight: 700;
    color: #dda0dd;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.8);
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 20px;
    background: rgba(10, 5, 20, 0.8);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.8) 0%, rgba(147, 112, 219, 0.8) 50%, rgba(138, 43, 226, 0.8) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: progressShine 2s linear infinite;
    position: relative;
    z-index: 1;
}

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

.progress-bar-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressGlow 1.5s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.progress-details {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.progress-current {
    font-weight: 700;
    color: #dda0dd;
}

.progress-separator {
    color: rgba(255, 255, 255, 0.5);
}

.progress-total {
    font-weight: 600;
    color: #fff;
}

.progress-log {
    max-height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
}

.log-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-item:last-child {
    border-bottom: none;
}

.log-success {
    color: #81c784;
}

.log-error {
    color: #ff8a80;
}

/* アップロード完了メッセージ */
.bulk-upload-complete {
    margin-top: 30px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(75, 0, 130, 0.2) 100%);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 20px;
    animation: completePulse 2s ease-in-out infinite;
}

@keyframes completePulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
    }
    50% { 
        box-shadow: 0 0 50px rgba(138, 43, 226, 0.8);
    }
}

.complete-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.8));
    animation: completeIconFloat 2s ease-in-out infinite;
}

@keyframes completeIconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.complete-message {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.8);
    margin-bottom: 10px;
}

.complete-count {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ボタン
   ============================================ */
.form-submit-wrapper {
    text-align: center;
    margin-top: 40px;
}

.mystical-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 45px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    letter-spacing: 1px;
    z-index: 1;
}

.mystical-button-primary {
    background: 
        linear-gradient(135deg, rgba(138, 43, 226, 0.9) 0%, rgba(75, 0, 130, 0.9) 100%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    box-shadow: 
        0 10px 35px rgba(138, 43, 226, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    animation: buttonPulse 3s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 10px 35px rgba(138, 43, 226, 0.5); }
    50% { box-shadow: 0 15px 45px rgba(138, 43, 226, 0.7); }
}

.mystical-button-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 50px rgba(138, 43, 226, 0.8),
        0 0 120px rgba(138, 43, 226, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
}

.button-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -60%;
    margin-top: -60%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.mystical-button:hover .button-glow {
    opacity: 1;
}

.button-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.mystical-button:hover .button-icon {
    transform: scale(1.2) rotate(5deg);
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.mystical-button:hover .button-shine {
    left: 100%;
}

.button-text {
    position: relative;
    z-index: 1;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 768px) {
    .mystical-title {
        font-size: 36px;
        flex-direction: column;
        gap: 15px;
    }
    
    .wizard-container {
        padding: 30px 20px;
    }
    
    .wizard-title {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .step-icon {
        font-size: 48px;
    }
    
    .step-title {
        font-size: 24px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .wizard-btn {
        width: 100%;
    }
    
    .wizard-review {
        max-width: 100%;
    }
    
    .review-item {
        padding: 20px;
    }
    
    .mystical-grid {
        grid-template-columns: 1fr;
    }
    
    .card-set-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .modal-container {
        margin: 10px;
    }
    
    .bulk-files-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .bulk-upload-zone {
        min-height: 200px;
    }
    
    .bulk-upload-icon {
        font-size: 48px;
    }
    
    .bulk-upload-main-text {
        font-size: 16px;
    }
}

