/* カスタムプロパティ（CSS変数） */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d3436 100%);
    --success-color: #00d2d3;
    --warning-color: #ff6b6b;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* アニメーション定義 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background: var(--dark-gradient);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 26, 0.95);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-xl);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

header h1 a {
    color: white;
    text-decoration: none;
    position: relative;
}

header h1 a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

header h1 a:hover::after {
    width: 100%;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ヒーローセクション */
.hero {
    background: var(--primary-gradient);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    color: white;
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: slide-in-up 0.8s ease-out;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.lead {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    animation: slide-in-up 1s ease-out;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.highlight {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: inline-block;
    animation: pulse-glow 2s infinite;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-secondary {
    background: rgba(255,255,255,0.95);
    color: #667eea;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.5);
}

.btn-danger {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    animation: slide-in-up 1.2s ease-out;
}

/* メリットセクション */
.benefits {
    padding: 100px 0;
    background: white;
    position: relative;
}

.benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(248,249,250,0), white);
    z-index: 1;
}

.benefits h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
}

.benefits h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.benefit-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #d1d1d1, -20px -20px 60px #ffffff;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 50%;
}

.benefit-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 30px 30px 80px #c1c1c1, -30px -30px 80px #ffffff;
}

.benefit-card:hover::before {
    opacity: 0.05;
}

.benefit-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.benefit-card ul {
    list-style: none;
}

.benefit-card li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.benefit-card li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.benefit-card li:before {
    content: "✨";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    animation: float 3s ease-in-out infinite;
}

/* 利用の流れ */
.how-it-works {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
}

.how-it-works h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(to right, transparent, #667eea, transparent);
    z-index: 0;
}

.step {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
    position: relative;
    transition: var(--transition-base);
}

.step:hover .step-number {
    transform: scale(1.1) rotate(360deg);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.6);
}

.step h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ボディーガード一覧 */
.bodyguard-list {
    padding: 100px 0;
    background: white;
}

.bodyguard-list h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
}

.bodyguard-list h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.no-data {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.area-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition-base);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.area-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.area-card:hover::before {
    transform: scaleX(1);
}

.area-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.area-card h3::before {
    content: "📍";
    font-size: 1.2rem;
}

.guard-list {
    list-style: none;
}

.guard-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-base);
}

.guard-list li:last-child {
    border-bottom: none;
}

.guard-list li:hover {
    padding-left: 1rem;
    background: rgba(79, 172, 254, 0.05);
    margin: 0 -0.5rem;
    padding-right: 0.5rem;
}

.twitter-link {
    color: #1da1f2;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.twitter-link::before {
    content: "🐦";
    font-size: 1.2rem;
}

.twitter-link:hover {
    color: #0c85d0;
    transform: translateX(3px);
}

/* 法的情報セクション */
.legal-info {
    padding: 100px 0;
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.legal-info h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
    position: relative;
}

.legal-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-gradient);
    border-radius: 2px;
}

.legal-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.legal-card::before {
    content: "⚖️";
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 150px;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.legal-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

blockquote {
    border-left: 4px solid;
    border-image: var(--secondary-gradient) 1;
    padding-left: 2rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
}

blockquote strong {
    color: #ff6b6b;
    font-size: 1.3rem;
}

.legal-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* フォーム */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: var(--primary-gradient);
    opacity: 0.03;
    transform: rotate(45deg);
}

.register-page,
.delete-page {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    transition: var(--transition-base);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    background: #f8f9fa;
    transition: var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input:focus + label {
    color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* メッセージ */
.message {
    padding: 1.2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    animation: slide-in-up 0.5s ease-out;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.message.success {
    background: linear-gradient(to right, rgba(0, 210, 211, 0.1), rgba(0, 210, 211, 0.05));
    color: #00838f;
}

.message.success::before {
    background: var(--success-color);
}

.message.error {
    background: linear-gradient(to right, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
    color: #c62828;
}

.message.error::before {
    background: var(--warning-color);
}

/* 情報ボックス */
.info-box,
.warning-box {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.info-box {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.warning-box {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.info-box h3 {
    margin-bottom: 1.2rem;
    color: #1565c0;
    font-size: 1.3rem;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.info-box li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #1976d2;
    font-weight: bold;
}

.legal-notice {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    border-left: 4px solid;
    border-image: var(--primary-gradient) 1;
}

.legal-notice h4 {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* フッター */
footer {
    background: var(--dark-gradient);
    color: white;
    padding: 3rem 0;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
}

.footer-links {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition-base);
    padding: 0.5rem 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    transform: translateY(-2px);
}

.footer-links a:hover::after {
    width: 100%;
}

footer p {
    text-align: center;
    opacity: 0.8;
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* ローディングアニメーション */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* エラー状態のスタイル */
.form-group input.error {
    border-color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.05);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
    animation: slide-in-up 0.3s ease-out;
}

/* リップルエフェクト */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* シェイクアニメーション */
form.shake {
    animation: shake 0.5s ease-in-out;
}

/* 3Dカードエフェクト */
.benefit-card,
.area-card,
.legal-card {
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
}

/* パーティクルキャンバス */
#particle-canvas {
    opacity: 0.3;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .lead {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 280px;
        text-align: center;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .steps::before {
        display: none;
    }
    
    .benefit-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .area-grid {
        grid-template-columns: 1fr;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ecf0f1;
        --text-secondary: #bdc3c7;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--text-primary);
    }
    
    .benefits,
    .bodyguard-list {
        background-color: #2c2c2c;
    }
    
    .form-container,
    .area-card,
    .legal-card {
        background-color: #333;
        color: var(--text-primary);
    }
}