/* Noir Theme - Cool Dark Theme */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-tertiary: #252d47;
    --text-primary: #e0e6ff;
    --text-secondary: #a0a8c8;
    --accent-cyan: #00d9ff;
    --accent-purple: #7c3aed;
    --accent-green: #39ff14;
    --border-color: #3a4259;
    --link-color: #00d9ff;
    --link-hover: #00f5ff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Trebuchet MS, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Background gradient effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 217, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

a:hover::after {
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.8em;
    border-left: 4px solid var(--accent-cyan);
    padding-left: 1em;
}

h3 {
    font-size: 1.3em;
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    position: relative;
}

/* Site Header with Banner */
.site-header {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(0, 217, 255, 0.1));
}

.top-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.6) contrast(1.2);
}

/* Author Information Section */
.author-infomation {
    position: relative;
    display: flex;
    align-items: center;
    padding: 30px 25px;
    margin: -40px 25px 0 25px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    background-color: rgba(26, 31, 58, 0.8);
}

.author-icon {
    position: relative;
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent-cyan);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.author-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.author-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.authoer-infomation-inner {
    margin-left: 25px;
    flex: 1;
}

.authoer-infomation-inner h2 {
    font-size: 1.5em;
    margin: 0 0 10px 0;
    border: none;
    padding: 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.p-sns-icon {
    display: inline-block;
    margin-right: 12px;
    font-size: 24px;
    color: var(--accent-cyan);
    transition: all 0.3s ease;
}

.p-sns-icon:hover {
    color: var(--accent-purple);
    transform: scale(1.2) translateY(-3px);
}

/* Navigation Menu */
.home-menu {
    list-style: none;
    display: flex;
    width: 100%;
    overflow-x: auto;
    justify-content: center;
    padding: 20px 0;
    gap: 30px;
    border-bottom: 2px solid var(--border-color);
}

.home-menu-item {
    position: relative;
    text-wrap: nowrap;
    flex-shrink: 0;
}

.home-menu-item a {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.home-menu-item a:hover {
    color: var(--accent-cyan);
}

.home-menu-item-current a {
    color: var(--accent-cyan);
    border-bottom: 3px solid var(--accent-cyan);
    padding-bottom: 5px;
}

/* Main Contents Area */
.main-contents {
    padding: 40px 40px 120px 40px;
    min-height: 400px;
}

.contents {
    margin-bottom: 40px;
}

/* Index Tag Cloud */
.index-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.index-tag-cloud a {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(0, 217, 255, 0.2));
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
    font-size: 0.9em;
    color: var(--accent-cyan);
    transition: all 0.3s ease;
}

.index-tag-cloud a:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(0, 217, 255, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.2);
}

/* Thumbnail Grid */
.log-list {
    margin-top: 30px;
}

@scope(.log-list) {
    .thumbnails {
        margin-top: 30px;
    }

    .thumbnails ul {
        list-style: none;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
        justify-items: center;
    }

    .thumbnail {
        position: relative;
        width: 180px;
        height: 220px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .thumbnail a {
        display: flex;
        flex-direction: column;
        height: 100%;
        text-decoration: none;
    }

    .thumbnail-item {
        position: relative;
        width: 180px;
        height: 180px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
        background: var(--bg-secondary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    .thumbnail:hover .thumbnail-item {
        border-color: var(--accent-cyan);
        box-shadow: 0 12px 36px rgba(0, 217, 255, 0.2);
        transform: translateY(-4px);
    }

    .thumbnail-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .thumbnail-info {
        position: absolute;
        top: 0;
        left: 0;
        width: 180px;
        height: 180px;
        display: grid;
        place-content: center;
        background: rgba(10, 14, 39, 0.7);
        backdrop-filter: blur(5px);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 8px;
    }

    .thumbnail:hover .thumbnail-info {
        opacity: 1;
    }

    .thumbnail-info span {
        color: var(--accent-cyan);
        font-weight: 600;
        text-align: center;
        padding: 10px;
    }

    .thumnail-title {
        text-wrap: wrap;
        font-weight: 600;
        color: var(--text-primary);
        margin-top: 12px;
        font-size: 0.95em;
        line-height: 1.3;
        transition: color 0.3s ease;
    }

    .thumbnail:hover .thumnail-title {
        color: var(--accent-cyan);
    }

    .pin-icon,
    .multi-icon {
        position: absolute;
        width: 18px;
        height: 18px;
        opacity: 0.8;
        z-index: 2;
        filter: brightness(2) drop-shadow(0 0 5px rgba(0, 217, 255, 0.5));
    }

    .pin-icon {
        right: 8px;
        bottom: 8px;
    }

    .multi-icon {
        left: 8px;
        bottom: 8px;
    }
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.pagination a:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.pagination_current,
.pagination .current {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(0, 217, 255, 0.3));
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Article List */
@scope(.article-list-normal) {
    li {
        list-style: none;
    }

    div.list-item {
        font-size: 1em;
        display: grid;
        grid-template-columns: 2em min-content 8em 3em auto;
        grid-template-rows: 1em 2em auto;
        margin: 0 3em 1em 3em;
        max-height: 150px;
        overflow: hidden;
        padding: 15px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    div.list-item:hover {
        border-color: var(--accent-cyan);
        background: rgba(26, 31, 58, 0.8);
        box-shadow: 0 8px 24px rgba(0, 217, 255, 0.1);
        transform: translateX(5px);
    }

    .list-item-thumb {
        grid-column: 2;
        grid-row: span 3;
        margin-right: 0.5em;
        width: var(--search-thumbnail-width, 100px);
        height: var(--search-thumbnail-height, 100px);
        background-color: var(--bg-tertiary);
        border: 2px solid var(--border-color);
        border-radius: 4px;
        overflow: hidden;
        background-size: cover;
        background-position: center center;
    }

    .list-item-thumb:hover {
        border-color: var(--accent-cyan);
        box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
    }

    .list-item-thumb-in {
        position: relative;
        width: var(--search-thumbnail-width, 100px);
        height: var(--search-thumbnail-height, 100px);
    }

    .list-item-created-at {
        text-wrap: nowrap;
        grid-column: 3;
        font-size: 0.7em;
        margin-right: 1em;
        color: var(--text-secondary);
    }

    .list-item-views,
    .list-item-like {
        font-size: 0.7em;
        text-wrap: nowrap;
        color: var(--text-secondary);
    }

    .list-item-views {
        grid-column: 4;
        min-width: 3em;
    }

    .list-item-like {
        grid-column: 5;
        min-width: 3em;
    }

    .list-item-title {
        align-self: center;
        grid-column: 3 / span 3;
        text-wrap: nowrap;
        line-height: 160%;
        text-overflow: ellipsis;
        font-weight: 600;
        color: var(--text-primary);
    }

    .list-item-title a {
        color: var(--link-color);
    }

    .list-item-caption {
        grid-column: 3 / span 3;
        font-size: 0.8em;
        overflow: hidden;
        line-height: 140%;
        max-height: var(--search-thumbnail-height, 100px);
        text-overflow: ellipsis;
        color: var(--text-secondary);
    }

    .list-item-caption a {
        color: var(--text-secondary);
    }

    .list-item-thumb-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .list-item-thumb-title {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: grid;
        place-content: center;
        background: rgba(10, 14, 39, 0.6);
        color: var(--accent-cyan);
        font-weight: 600;
    }
}

/* Footer */
.global-footer {
    position: relative;
    padding: 30px 25px;
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
    background: var(--bg-secondary);
}

.global-footer a {
    color: var(--accent-cyan);
}

/* Article Container Specific */
.article_container {
    max-width: 900px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

/* Sections */
.section {
    margin-bottom: 2rem;
}

.section.title h1 {
    margin-top: 0;
}

.section.created-at {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-style: italic;
}

.section.tag {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section.tag a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 16px;
    font-size: 0.85em;
    color: var(--accent-cyan);
}

/* Control Section */
.control {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.move_control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.5em;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.move_prev {
    text-align: left;
    padding-left: 0.5em;
    justify-self: start;
}

.move_next {
    text-align: right;
    padding-right: 0.5em;
    justify-self: end;
}

.move_separator {
    text-align: center;
    color: var(--text-secondary);
}

.move_control span {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Elements Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select,
.p-input,
.p-textarea {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea {
    caret-color: var(--accent-cyan);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary,
            #ccc);
    opacity: 0.7;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="datetime-local"]:hover,
input[type="month"]:hover,
input[type="week"]:hover,
textarea:hover,
select:hover {
    border-color: var(--accent-cyan);
    background-color: var(--bg-tertiary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 217, 255, 0.2);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-purple);
    background-color: rgba(37, 45, 71, 0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 16px rgba(124, 58, 237, 0.3);
}

select {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Search input styling */
.p-search-input {
    display: flex;
    align-items: center;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.p-search-input:hover {
    border-color: var(--accent-cyan);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 217, 255, 0.2);
}

.p-search-input:focus-within {
    border-color: var(--accent-purple);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 16px rgba(124, 58, 237, 0.3);
}

[data-search-input] {
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    flex: 1;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

[data-search-input]::placeholder {
    color: var(--text-secondary,
            #ccc);
    opacity: 0.6;
}

[data-search-button],
[data-search-clear] {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-search-button]:hover,
[data-search-clear]:hover {
    color: var(--accent-purple);
    transform: scale(1.15);
}

/* Buttons */
.p-button {
    padding: 12px 28px;
    margin: 10px 5px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    height: initial;
}

.p-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

.p-button:active {
    transform: translateY(0);
}

.p-button-normal {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.p-button-normal:hover {
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.2);
}

.p-button-like-it {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(57, 255, 20, 0.1);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.p-button-like-it:hover {
    background: rgba(57, 255, 20, 0.2);
    transform: scale(1.05);
}

#like-heart {
    color: var(--accent-green);
    margin-right: 5px;
}

/* Back Link */
.global-header {
    margin: 20px;
}

.global-header a,
.header a {
    color: var(--link-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header {
    margin: 10px 20px;
}

/* Admin Header */
.admin_header {
    position: relative;
    z-index: 100;
}

/* Responsive Design */
@media (max-width: 768px) {
    .author-infomation {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .authoer-infomation-inner {
        margin-left: 0;
        margin-top: 15px;
    }

    .home-menu {
        gap: 15px;
    }

    .home-menu-item a {
        font-size: 0.95em;
    }

    .main-contents {
        padding: 20px 20px 100px 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    @scope(.log-list) {
        .thumbnails ul {
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 15px;
        }

        .thumbnail,
        .thumbnail-item {
            width: 140px;
            height: 160px;
        }

        .thumbnail-item {
            height: 140px;
        }

        .thumbnail-info {
            width: 140px;
            height: 140px;
        }
    }

    @scope(.article-list-normal) {
        div.list-item {
            grid-template-columns: 1fr;
            grid-template-rows: auto;
            max-height: none;
            margin: 0 1em 1em 1em;
        }

        .list-item-thumb {
            grid-column: 1;
            grid-row: 1;
            margin-right: 0;
            margin-bottom: 10px;
        }

        .list-item-created-at,
        .list-item-views,
        .list-item-like,
        .list-item-title,
        .list-item-caption {
            grid-column: 1;
        }
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .main-contents {
        padding: 15px 15px 80px 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    .home-menu {
        gap: 10px;
        padding: 15px 0;
    }

    @scope(.log-list) {
        .thumbnails ul {
            grid-template-columns: repeat(2, 1fr);
        }

        .thumbnail,
        .thumbnail-item {
            width: 100%;
            height: auto;
        }
    }
}