@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --accent-color: #3b82f6;
    /* Modern Blue */
    --accent-hover: #2563eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 16px;
    --modal-bg: rgba(0, 0, 0, 0.75);
    --backdrop-blur: 8px;
}

body {
	font-family: 'Noto Sans JP', sans-serif;
	/* [disabled]background-color: var(--bg-color); */
	color: var(--text-primary);
	margin: 0;
	padding: 0;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

header {
margin: 180px auto 0;
width: 96%;
max-width: 1000px;
padding: 0 1em;
}

@media screen and (max-width:860px){
header {
margin: 20px auto 0;
width: 96%;
max-width: 1000px;
padding: 0 1em;
}
}

.cont_copy {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

h1 {
    margin: 0 0 1rem 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

.intro-text {
	max-width: 700px;
	margin: 0 auto 2em;
	color: var(--text-secondary);
	font-size: 1.1rem;
	font-weight: 400;
	text-align: center;
	display: table;
}

/* Gallery Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.gallery-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
}

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

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.03);
}

.caption {
    padding: 1.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    position: relative;
    z-index: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: transparent;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    background: #000;
}

.modal-caption {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ffffff;
}

/* Admin Styles */
.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.upload-section {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background-color: #f8fafc;
    border: 2px dashed #cbd5e0;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: border-color 0.2s;
}

.upload-section:hover {
    border-color: var(--accent-color);
}

.upload-section h2,
.list-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
}

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

.btn-primary:active {
    transform: translateY(1px);
}

.post-list {
    list-style: none;
    padding: 0;
}

.post-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background-color: #f8fafc;
}

.post-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.post-info {
    flex: 1;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

@media (min-width: 640px) {
    .post-actions {
        flex-direction: row;
    }
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.btn-danger {
    background-color: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #fecaca;
}

/* Navigation Area */
.date-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
    height: 40px;
    /* Force height to keep layout stable */
}

.nav-btn {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    background: #ffffff;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
}

/* Filter Notice */
.filter-notice {
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    text-align: center;
}

.filter-notice a {
    color: var(--accent-color);
    margin-top: 0.5rem;
    display: inline-block;
}

/* Archives Section */
.archive-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.archive-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.archive-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.archive-list a {
    text-decoration: none;
    color: var(--text-secondary);
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.archive-list a:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Admin List Styles */
.date-header {
    background: #e2e8f0;
    color: #2d3748;
    padding: 0.75rem 1rem;
    margin: 2rem 0 0 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 2px solid #cbd5e0;
}

.date-header+.post-list {
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.date-header+.post-list .post-item:last-child {
    border-bottom: none;
}

/* Login Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Post Detail Styles */
.post-detail {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.detail-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.detail-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 3rem;
}

.detail-media-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-media-item {
    text-align: center;
}

.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    cursor: zoom-in;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.detail-image:hover {
    transform: scale(1.01);
}

.detail-video {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.media-caption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Simplified Modal for Detail Page */
.modal-content.simplified {
    background: transparent;
    box-shadow: none;
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image-fit {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
}

.category-nav {

}
