:root {
    --primary-color: #5e72e4;
    --primary-hover: #4c63d2;
    --danger-color: #f5365c;
    --warning-color: #fb6340;
    --success-color: #2dce89;
    --text-primary: #32325d;
    --text-secondary: #8898aa;
    --border-color: #e9ecef;
    --background: #f8f9fe;
    --card-background: #ffffff;
    --shadow-sm: 0 0 0.5rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ヘッダー */
header {
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.language-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

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

/* メインコンテンツ */
main {
    flex: 1;
    padding: 2rem 0;
}

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

.hero-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* アップロードエリア */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    background: var(--card-background);
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(94, 114, 228, 0.02);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(94, 114, 228, 0.05);
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 画像プレビュー */
.image-preview {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.preview-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 300px;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.image-info {
    display: flex;
    flex-direction: column;
}

.info-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 120px;
}

.info-value {
    color: var(--text-primary);
    word-break: break-all;
}

/* EXIFセクション */
.exif-section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* タブ */
.exif-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* EXIFテーブル */
.exif-table {
    width: 100%;
    border-collapse: collapse;
}

.exif-table tr {
    border-bottom: 1px solid var(--border-color);
}

.exif-table tr:last-child {
    border-bottom: none;
}

.exif-table td {
    padding: 0.75rem;
}

.exif-name {
    font-weight: 500;
    color: var(--text-secondary);
    width: 40%;
}

.exif-value {
    color: var(--text-primary);
}

/* ボタン */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #ec0c38;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #fa3a0e;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.features-section h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

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

.feature-card {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

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

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

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

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* フッター */
footer {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* メッセージ */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
    
    .exif-tabs {
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}