/* admin.css - Admin Specific Styles (Unified Design) */

:root {
    --admin-bg: #f8fafc;
    --admin-card-bg: rgba(255, 255, 255, 0.85);
    --admin-accent: var(--acc-color, #ff7a7a);
    --admin-accent-hover: var(--acc-hover, #ff5c5c);
    --admin-text: var(--text-color, #2d3436);
    --admin-text-muted: #636e72;
    --admin-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --admin-glass-border: rgba(255, 255, 255, 0.3);
}

/* Base Fade-in Animation */
@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container: PC基調のため少し広めに。上下の余白もvhでゆったりと。 */
.admin-container {
    width: min(94%, 1100px);
    margin: clamp(40px, 10vh, 100px) auto;
    padding: 0 20px;
    animation: adminFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typography Enhancements */
h1,
h2,
h3 {
    color: var(--admin-text);
    font-weight: 700;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    margin-bottom: 40px;
    position: relative;
    padding-left: 20px;
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Grid-based Navigation (Unified) */
.admin-nav {
    background: var(--admin-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-glass-border);
    margin-bottom: 50px;
}

.admin-nav a {
    color: var(--admin-text);
    text-decoration: none;
    font-weight: 600;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: #fff;
    color: var(--admin-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--admin-glass-border);
}

.admin-nav a .material-symbols-rounded {
    font-size: 2rem;
}

/* Sections & Cards: Glassmorphism */
.admin-section,
.common-section,
.skillet-card,
.admin-card {
    background: var(--admin-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--admin-glass-border);
    padding: clamp(30px, 6vw, 60px);
    border-radius: 32px;
    margin-bottom: 40px;
    box-shadow: var(--admin-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-section:hover,
.common-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

/* Buttons (Unified) */
.btn,
.skillet-submit-btn,
.admin-submit-btn,
.btn-save {
    background: var(--admin-accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 122, 122, 0.3);
}

.btn:hover,
.skillet-submit-btn:hover,
.admin-submit-btn:hover,
.btn-save:hover {
    background: var(--admin-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 122, 0.4);
}

.btn-delete {
    background: transparent;
    color: #ff8b8b;
    border: 2px solid #ff8b8b;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #ff8b8b;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 139, 139, 0.3);
}

/* Forms & Editors */
textarea,
.admin-textarea,
.admin-delete-input,
.status-select {
    width: 100%;
    background: #fff;
    border: 1.5px solid #edf2f7;
    border-radius: 16px;
    padding: 18px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--admin-text);
    transition: all 0.3s;
    outline: none;
}

textarea,
.admin-textarea {
    min-height: 70vh;
    /* PC向けに高さを大幅に確保 */
    font-family: 'IBM Plex Sans JP', sans-serif;
}

#markdown-content {
    min-height: 75vh;
}

textarea:focus,
.admin-textarea:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.1);
}

/* Tweet / Post List */
.tweet-log,
.admin-post-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.tweet-log li,
.admin-post-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px 25px;
    border-radius: 20px;
    border: 1.5px solid #edf2f7;
    transition: all 0.2s;
}

.tweet-log li:hover,
.admin-post-item:hover {
    border-color: var(--admin-accent);
    background: #fff;
    transform: translateX(5px);
}

.tweet-date,
.admin-post-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--admin-accent);
    margin-bottom: 6px;
    display: block;
}

/* Status Groups (Chip style selection) */
.status-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 24px;
    margin: 20px 0;
    align-items: center;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    padding: 10px 24px;
    background: #fff;
    border: 1.5px solid #edf2f7;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-label:hover {
    border-color: var(--admin-accent);
    background: #fff5f5;
}

.status-label:has(input:checked) {
    background: var(--admin-accent);
    color: #fff;
    border-color: var(--admin-accent);
    box-shadow: 0 8px 16px rgba(255, 122, 122, 0.25);
}

.status-label input {
    display: none;
    /* ラジオボタン自体は隠す */
}

/* Select box refinement */
.status-select {
    width: auto;
    padding: 10px 15px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #edf2f7;
    cursor: pointer;
}

/* PukiWiki Editor Specific */
.edit_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#edit_form textarea {
    min-height: 70vh;
}

/* Specific for Note Editor */
.editor-area {
    margin-top: 20px;
}

.bottom-bar {
    position: sticky;
    bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 24px;
    margin-top: 30px;
    border: 1px solid var(--admin-glass-border);
    box-shadow: var(--admin-shadow);
}

/* Misc Utilities */
.msg {
    background: #fff5f5;
    color: #c53030;
    padding: 20px 30px;
    border-radius: 18px;
    border-left: 6px solid var(--admin-accent);
    margin-bottom: 30px;
    font-weight: 700;
    animation: adminFadeIn 0.5s ease;
}

.admin-icon-mid {
    vertical-align: middle;
}

/* Wiki Archive Section */
.wiki-archive-section {
    padding: 24px;
    background: #fff;
    border: 1.5px dashed #edf2f7;
    border-radius: 20px;
    margin-top: 40px;
}

.wiki-archive-textarea {
    min-height: 50px;
    width: 100%;
    padding: 6px 15px;
    font-family: inherit;
    font-size: 0.85rem;
    border: 1.5px solid #edf2f7;
    border-radius: 10px;
    background: #f8fafc;
    resize: vertical;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}

.wiki-archive-textarea:focus {
    background: #fff;
    border-color: var(--admin-accent);
    height: 120px;
    overflow: auto;
}

.wiki-archive-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiki-archive-section p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.wiki-archive-note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
}