:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gradient-brand: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

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

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Glow */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism Utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Header */
header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0 40px;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--gradient-brand);
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.mobile-break {
    display: none;
}

.hidden {
    display: none !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.admin-login-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-login-btn:hover,
.admin-login-btn.is-active {
    color: var(--text-main);
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.16);
}

/* Hero Section */
.hero {
    padding: 180px 20px 80px;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 100px;
}

.filter-bar {
    display: inline-flex;
    padding: 6px;
    gap: 8px;
    margin-bottom: 40px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Card */
.content-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.content-card:hover {
    transform: scale(1.02);
}

.card-inner {
    position: relative;
    height: 100%;
    aspect-ratio: 4/3;
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    text-align: left;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.card-video {
    background: rgba(255,255,255,0.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 20px;
}

.content-card:hover .card-overlay {
    opacity: 1;
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.card-author {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.card-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--gradient-brand);
    border-color: transparent;
    transform: scale(1.1);
}

.type-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.2rem;
        letter-spacing: -0.02em;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 160px 10px 60px;
    }
    .hero-title {
        font-size: 3.3rem;
        letter-spacing: -0.05em;
        line-height: 1.0;
    }
    .nav-links {
        display: none;
    }
    header {
        padding: 0 12px;
    }
    nav {
        padding: 10px 12px;
    }
    .logo h1 {
        font-size: 1rem;
    }
    .nav-actions {
        gap: 5px;
    }
    .admin-login-btn,
    .btn-primary {
        padding: 8px 9px;
        font-size: 0.8rem;
    }
    .detail-layout {
        flex-direction: column;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gallery-section {
        padding: 20px 12px 80px;
    }
    .card-info h3 {
        font-size: 0.9rem;
    }
    .card-overlay {
        padding: 12px;
    }
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* スマホ縦向き専用の調整 */
@media (max-width: 480px) {
    .logo {
        align-items: flex-start;
        padding-top: 4px;
    }
    .mobile-break {
        display: block;
    }
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content.large {
    max-width: 1000px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-main);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
}

.file-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.file-drop-zone:hover, .file-drop-zone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(255, 71, 126, 0.1);
    transform: translateY(-2px);
}

.file-drop-zone.has-file {
    border-style: solid;
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(255, 71, 126, 0.2), rgba(172, 71, 255, 0.2));
    box-shadow: 0 0 20px rgba(255, 71, 126, 0.3);
}

.file-drop-zone.has-file #file-label {
    color: white;
    font-weight: bold;
}

.file-drop-zone #file-label {
    transition: all 0.3s ease;
    display: block;
    pointer-events: none;
}

.thumbnail-drop-zone {
    padding: 28px 16px;
}

.thumbnail-drop-zone #thumbnail-label {
    transition: all 0.3s ease;
    display: block;
    pointer-events: none;
}

.thumbnail-drop-zone.has-file #thumbnail-label {
    color: white;
    font-weight: bold;
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.full-width {
    width: 100%;
}

/* Detail Modal Specifics */
.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

.detail-visual img, .detail-visual video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-visual img, .detail-visual video {
        max-height: 50vh;
    }
}

.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-weight: 600;
}

.detail-desc {
    color: var(--text-muted);
}

.comment-item {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
}

.comment-author {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--accent-primary);
}

.comment-content {
    font-size: 0.9rem;
    word-break: break-word;
}

.comment-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags span {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
