* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hiragino Kaku Gothic ProN', sans-serif;
}

:root {
    --bg-color: #f5f5f5;
    --text-color: #2d2d2d;
    --accent-start: #9f51f3;
    --accent-end: #7b3fe4;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-blur: 10px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0, 0.05);
}

/* ダークモード */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: rgba(40, 40, 40, 0.8);
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

body {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-top: calc(2.56rem + 20px);
    margin: 0;
}

header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    font-size: 19.2px;
    font-weight: 600;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
    height: 2.56rem;
}

.burger-icon {
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.4s ease;
    width: 3rem;
    height: 100%;
    position: absolute;
    top: 0;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    touch-action: manipulation;
}

.burger-icon:hover {
    color: var(--accent-start);
}

/* バーガーメニュー */
.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 33.33%;
    height: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
}

.nav-menu.active {
    transform: translateX(0);
}

/* タブレット用 */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-menu {
        right: 0;
        width: 70%;
        transform: translateX(100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .burger-icon {
        width: 3rem;
        height: 100%;
        top: 0;
        right: 1rem;
    }
}

/* スマホ用 */
@media (max-width: 768px) {
    .nav-menu {
        right: 0;
        width: 100vw;
        border-radius: 0;
        margin: 0;
        transform: translateX(100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .burger-icon {
        font-size: 1.5rem;
        width: 3rem;
        height: 100%;
        top: 0;
        right: 1rem;
    }
}

.nav-menu-header {
    height: 2.56rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

/* ✕ボタン */
.close-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.4s ease;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1005;
    padding: 0.75rem;
    display: none;
    height: 2.56rem;
    line-height: 1.56rem;
}

.nav-menu.active ~ .close-icon {
    display: block;
}

.close-icon:hover {
    color: var(--accent-start);
}

/* タブレット用 */
@media (max-width: 1024px) and (min-width: 769px) {
    .close-icon {
        top: 0;
        right: 0;
    }
}

/* スマホ用 */
@media (max-width: 768px) {
    .close-icon {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
        padding: 0.75rem;
    }
}

.nav-menu ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 0 20px;
    max-width: calc(100% - 40px);
    margin-top: 1rem;
}

.nav-menu li {
    margin-bottom: 1.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.4s ease;
}

.nav-menu a:hover {
    color: var(--accent-start);
}

.nav-menu .material-symbols-rounded {
    font-size: 20px;
    color: #888;
    transition: color 0.4s ease;
}

.nav-menu a:hover .material-symbols-rounded {
    color: var(--accent-start);
}

/* HOMEに戻るリンク（リストと同じスタイル） */
.home-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.4s ease;
}

.home-button:hover {
    color: var(--accent-start);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .nav-menu-header {
        height: 2.56rem;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        font-size: 19.2px;
        padding: 1rem;
        width: 100%;
        height: 2.56rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }
}

/* 更新情報 */
.update-info {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    text-align: left;
}

.update-info p {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    line-height: 1.6;
    background: linear-gradient(to right, #555, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* トースト通知 */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 28px;
    color: var(--accent-start);
    background: linear-gradient(to right, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 24px;
    color: var(--text-color);
    font-weight: 600;
}

.container > p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.6;
}

.upload-section {
    margin-bottom: 20px;
    position: relative;
}

.drop-area {
    background-color: #f5f5f5;
    border: 2px solid var(--accent-start);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.drop-area.dragover {
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3);
    transform: scale(1.02);
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.drop-area.loading .upload-icon,
.drop-area.loading .upload-text,
.drop-area.loading .supported-files {
    opacity: 0.3;
}

.drop-area.loading .loading-spinner {
    display: block;
}

.upload-icon {
    font-size: 48px;
    color: var(--accent-start);
    margin-bottom: 10px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.upload-text {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.size-limit {
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

.supported-files {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.exif-section {
    margin-bottom: 20px;
}

.exif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.exif-header h2 {
    font-size: 20px;
    color: var(--text-color);
    font-weight: 600;
}

.exif-reset-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.exif-reset-btn .material-icons {
    font-size: 24px;
    color: var(--accent-start);
    transition: color 0.2s;
}

.exif-reset-btn:hover .material-icons {
    color: var(--accent-end);
}

.preview-area {
    margin-bottom: 20px;
    text-align: center;
}

.preview-area img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.preview-area .default-icon {
    font-size: 100px;
    color: var(--accent-start);
}

.clear-metadata-container {
    text-align: right;
    margin-bottom: 20px;
    display: none;
}

.control-btn {
    background: linear-gradient(to right, var(--accent-start), var(--accent-end));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.control-btn:hover {
    background: linear-gradient(to right, #9b5ff4, #c47dff);
}

.exif-table {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.exif-row {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exif-row:last-child {
    border-bottom: none;
}

.exif-row label {
    flex-grow: 1;
    font-weight: bold;
    order: 1;
}

.exif-row span.value {
    flex-grow: 2;
    text-align: right;
    order: 2;
}

.exif-row input {
    flex-grow: 2;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: right;
    order: 2;
}

.exif-row .edit-icon,
.exif-row .delete-icon {
    font-size: 20px;
    color: var(--accent-start);
    cursor: pointer;
    transition: color 0.2s;
}

.exif-row .delete-icon {
    order: 4;
}

.exif-row .edit-icon:hover,
.exif-row .delete-icon:hover {
    color: var(--accent-end);
}

.no-exif {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding: 20px;
}

.process-btn {
    background: linear-gradient(to right, var(--accent-start), var(--accent-end));
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.process-btn:hover {
    background: linear-gradient(to right, #9b5ff4, #c47dff);
}

.process-btn:disabled {
    background: #a1a1a1;
    cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1, .exif-header h2 {
        font-size: 20px;
    }

    .title-icon {
        font-size: 24px;
    }

    .container > p {
        font-size: 12px;
    }

    .drop-area {
        padding: 20px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-text {
        font-size: 14px;
    }

    .size-limit {
        font-size: 10px;
    }

    .supported-files {
        font-size: 10px;
    }

    .loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }

    .exif-reset-btn .material-icons {
        font-size: 20px;
    }

    .preview-area .default-icon {
        font-size: 80px;
    }
}