/* ============================================================================
 * GridShot Camera - スタイルシート（P2パフォーマンス最適化版）
 * ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* 言語セレクター */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 1);
}

.language-selector select {
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.language-selector select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ヒーローセクション */
.hero-multilang {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-multilang::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>') repeat;
    opacity: 0.3;
}

.hero-multilang .container {
    position: relative;
    z-index: 2;
}

.hero-multilang h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-multilang p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 30px;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ダウンロードボタンコンテナ */
.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.download-buttons a {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.download-buttons a:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 機能グリッド */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
    opacity: 0;
    transform: translateY(30px);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.feature-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-card .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
}

/* 使い方セクション */
.how-to-use {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.how-to-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    background: white;
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(30px);
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.step-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* スクリーンショットセクション */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.screenshot-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.screenshot-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.screenshot-container:hover {
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.screenshot-container img {
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.screenshot-container img:hover {
    transform: scale(1.02);
}

.screenshot-caption {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-section p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 40px;
    opacity: 0.95;
}

/* プライバシーポリシー */
.privacy-policy {
    padding: 80px 0;
    background: #f8f9fa;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.8;
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.governing-note {
    opacity: 0.85;
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.privacy-content h3 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.privacy-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.privacy-content li {
    margin-bottom: 8px;
}

.privacy-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    color: #d63384;
}

/* フッター */
footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0;
    text-align: center;
}

footer a {
    color: white;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

footer a:hover {
    color: #667eea;
    transform: scale(1.1);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.modal-close:hover {
    color: #667eea;
    transform: scale(1.1);
}

.modal img {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    margin-top: 50px;
    border-radius: 12px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .language-selector {
        position: static;
        margin: 20px auto;
        width: fit-content;
    }
    
    .hero-multilang {
        padding: 60px 20px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .how-to-steps {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .screenshot-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .privacy-content {
        padding: 30px 25px;
        margin: 0 20px;
    }
    
    .download-buttons {
        gap: 15px;
    }
    
    .download-buttons img {
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-multilang h1 {
        font-size: 2rem;
    }
    
    .feature-card,
    .step-card {
        padding: 25px 20px;
    }
    
    .privacy-content {
        padding: 25px 20px;
        font-size: 14px;
    }
    
    .modal img {
        width: 95%;
        margin-top: 30px;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ダークモード対応（任意） */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2a2a2a;
    }
    
    /* ダークモード時のスタイル調整は必要に応じて */
}

/* パフォーマンス最適化 */
.feature-card,
.step-card,
.screenshot-item {
    will-change: transform, opacity;
}

.feature-card.animate,
.step-card.animate {
    will-change: auto;
}

/* プリント対応 */
@media print {
    .language-selector,
    .download-buttons,
    .modal {
        display: none !important;
    }
    
    .hero-multilang {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .cta-section {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}