:root {
    --primary-color: #5469d4;
    --primary-hover: #4454c7;
    --danger-color: #e74c3c;
    --danger-hover: #c0392b;
    --success-color: #27ae60;
    --success-hover: #229954;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background: #f7fafc;
    --surface: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lang-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.lang-selector select:hover {
    border-color: var(--primary-color);
}

.lang-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(84, 105, 212, 0.1);
}

/* メインコンテンツ */
.main-content {
    padding: 3rem 0;
}

/* ヒーローセクション */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* レコーダーカード */
.recorder-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.recorder-controls {
    margin-bottom: 2rem;
}

.screen-selector {
    margin-bottom: 1.5rem;
}

.screen-selector label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(84, 105, 212, 0.05);
}

.radio-option input[type="radio"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.audio-selector {
    margin-bottom: 2rem;
}

.checkbox-option {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-option:hover {
    border-color: var(--primary-color);
    background: rgba(84, 105, 212, 0.05);
}

.checkbox-option input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ボタン */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-hover) 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-hover) 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-hover) 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    font-size: 1.2rem;
}

/* 録画ステータス */
.recording-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.recording-status.hidden {
    display: none;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* プレビューセクション */
.preview-section {
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
}

.preview-section.hidden {
    display: none;
}

.preview-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

#previewVideo {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.preview-controls {
    display: flex;
    gap: 1rem;
}

/* 機能セクション */
.features-section {
    margin-bottom: 3rem;
}

.features-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 使い方セクション */
.usage-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.usage-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.usage-steps {
    list-style: none;
    counter-reset: step-counter;
}

.usage-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.usage-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* フッター */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-option {
        width: 100%;
    }
    
    .preview-controls {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ユーティリティ */
.hidden {
    display: none !important;
}