:root {

    --bg:#0a1510;
    --surface:#16251a;
    --surface-2:#20362a;
    --surface-3:#2c4a37;
    --surface-4:#3a5f47;

    --text:#f3f1ea;
    --text-muted:#a9a595;
    --text-muted-2:#d4d0c4;

    --accent:#e0a868;
    --accent-hover:#edbc82;
    --accent-dark:#12160f;

    --border:rgba(224,168,104,.24);
    --divider:var(--accent);
    --shadow:rgba(0,0,0,.5);

}



body {

    background:var(--bg);

    color:var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    margin:20px;

}



header {

    background:linear-gradient(160deg, var(--surface), var(--surface-2));

    border:1px solid var(--border);

    border-radius:16px;

    padding:14px 20px 12px;

    margin-bottom:8px;

    box-shadow:0 6px 20px var(--shadow);

}



h1 {

    display:flex;

    align-items:center;

    justify-content:center;

    gap:10px;

    text-align:center;

    margin:0 0 12px;

    font-weight:600;

    letter-spacing:.3px;

}


.header-logo {

    height:32px;

    width:auto;

}



.toolbar {

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    align-items:center;

    margin-bottom:0;

}



.toolbar button {

    min-width:100px;

    padding:8px 16px;

    text-align:center;

    font-size:16px;

    font-weight:700;

}


.icon-button {

    min-width:auto !important;

    width:42px;

    padding:8px !important;

    font-size:21px;

    font-weight:700;

    line-height:1;

}


#search {

    flex:0 0 100%;

    max-width:320px;

    margin-top:2px;

}



button,
input {

    padding:10px 14px;

    border-radius:8px;

    border:1px solid transparent;

    font-size:15px;

    font-family:inherit;

}



button {

    background:var(--surface-3);

    color:var(--text);

    cursor:pointer;

    border:1.5px solid rgba(224,168,104,.45);

    box-shadow:0 2px 6px rgba(0,0,0,.35);

    transition:background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;

}


.viewerActionButton {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 3px 8px;

    height: 28px;

    box-sizing: border-box;

    font-family: inherit;
    font-size: inherit;

    line-height: 1;

    color: inherit;
    background:var(--surface-2);
    text-decoration: none;

    border: 1px solid var(--border);

    border-radius: 3px;

    cursor: pointer;

    margin-right: 6px;

    transition:background .15s ease;
}

.viewerActionButton:hover {

    background:var(--surface-3);

}

.viewerButtons {
    margin-bottom: 10px;
}

.viewerInfo {
    line-height: 1.6;
}

.viewerTags {
    color: var(--text-muted);
    font-size: 16px;
    white-space: normal;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}


button:hover {

    background:var(--surface-4);

    border-color:var(--accent);

    box-shadow:0 4px 10px rgba(0,0,0,.4);

}



input {

    width:250px;

    background:var(--surface-3);

    color:var(--text);

    border:1.5px solid rgba(224,168,104,.45);

    box-shadow:0 2px 6px rgba(0,0,0,.35);

    transition:border-color .15s ease, box-shadow .15s ease;

}


input:focus {

    outline:none;

    background:var(--surface-4);

    border-color:var(--accent);

    box-shadow:0 4px 10px rgba(0,0,0,.4);

}



input[type="checkbox"] {

    width:auto;

    padding:0;

    margin-right:6px;

    accent-color:var(--accent);

    background:none;

    border:none;

    box-shadow:none;

}



#breadcrumb {

    margin-bottom:20px;

    color:var(--text-muted);

}





/* Timeline */


.timeline-month {

    margin-top:35px;

}



.month-title {

    font-size:30px;

    font-weight:600;

    border-bottom:

        3px solid var(--divider);

    padding-bottom:10px;

    margin-bottom:20px;

}



.day-section {

    margin-bottom:35px;

}



.day-title {

    font-size:22px;

    color:var(--text-muted-2);

    margin-bottom:12px;

    border-bottom:

        2px solid var(--divider);

    padding-bottom:6px;

}



.date-title {

    font-size:19px;

    color:var(--text-muted-2);

    margin-bottom:12px;

    border-bottom:

        2px solid var(--divider);

    padding-bottom:6px;

}



.day-summary {

    color:var(--text-muted);

    font-size:14px;

    margin-left:10px;

}





/* Gallery grid */


.gallery {

    display:grid;

    grid-template-columns:

        repeat(
            auto-fill,
            minmax(
                220px,
                1fr
            )
        );


    gap:15px;

}



.favorite-star {

    position: absolute;

    top: 8px;

    right: 8px;

    font-size: 24px;

    z-index: 2;

    filter:drop-shadow(0 1px 3px rgba(0,0,0,.6));

}


.card {

    background:var(--surface);

    border-radius:12px;

    overflow:hidden;

    cursor:pointer;
    position: relative;

    border:1px solid var(--border);

    transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;

}



.card.selected {

    outline: 3px solid var(--accent);

    outline-offset: -3px;

}



.select-checkbox {

    display: none;

    position: absolute;

    top: 8px;

    left: 8px;

    width: 24px;

    height: 24px;

    z-index: 3;

    border-radius: 50%;

    background: rgba(0,0,0,.6);

    border: 2px solid var(--text);

    align-items: center;

    justify-content: center;

    font-size: 15px;

    box-sizing: border-box;

}



body.selecting .select-checkbox {

    display: flex;

}



.card.selected .select-checkbox {

    background: var(--accent);

    border-color: var(--accent);

}



.bulk-bar {

    display: none;

    position: fixed;

    bottom: 0;

    left: 0;

    right: 0;

    background: var(--surface-2);

    padding: 14px 20px;

    gap: 12px;

    align-items: center;

    justify-content: center;

    z-index: 900;

    box-shadow: 0 -2px 10px var(--shadow);

    border-top:1px solid var(--border);

}



.bulk-bar.visible {

    display: flex;

}



#bulkCount {

    margin-right: 10px;

    color: var(--text-muted-2);

}



#selectButton.active {

    background: var(--accent);

    color: var(--accent-dark);

    border-color:var(--accent);

}



#selectButton.active:hover {

    background: var(--accent-hover);

}



.card:hover {

    transform:translateY(-2px);

    box-shadow:0 8px 20px var(--shadow);

    border-color:var(--border);

}



.card img {

    width:100%;

    height:220px;

    object-fit:contain;

    background:#000;

    display:block;

}





.card-info {

    padding:10px;

    font-size:14px;

}



.card-name {

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}





/* Video thumbnails */


.video-thumb {

    position:relative;

}



.play {

    position:absolute;

    top:50%;

    left:50%;


    transform:
        translate(
            -50%,
            -50%
        );


    font-size:60px;

    color:var(--accent);

    text-shadow:

        0 0 10px black;

}





/* Albums */


.album-grid {

    display:grid;

    grid-template-columns:

        repeat(
            auto-fill,
            minmax(
                250px,
                1fr
            )
        );


    gap:20px;

}



.album {

    background:var(--surface);

    border-radius:12px;

    overflow:hidden;

    cursor:pointer;

    border:1px solid var(--border);

    transition:transform .15s ease, box-shadow .15s ease;

}


.album:hover {

    transform:translateY(-2px);

    box-shadow:0 8px 20px var(--shadow);

}



.album img {

    width:100%;

    height:180px;

    object-fit:cover;

}



.album-info {

    padding:15px;

}



.album-info strong {

    color:var(--accent);

}




/* Viewer */


.viewer {

    display:none;

    position:fixed;

    inset:0;

    background:

        rgba(
            0,
            0,
            0,
            .95
        );


    z-index:1000;

    align-items:center;

    justify-content:center;

}



.viewer-panel {

    width:95vw;

    height:95vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

}



#viewerContent {

    flex:1;

    width:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    overflow:hidden;

}



#viewerContent img,
#viewerContent video {

    max-width:100%;

    max-height:100%;

    object-fit:contain;

}





.viewer-info {

    padding:10px;

    font-size:16px;

    white-space:nowrap;

    line-height: 1.6;

}





.close {

    position:absolute;

    top:20px;

    right:30px;

    font-size:40px;

    cursor:pointer;

    z-index:1100;

    color:var(--text);

    transition:color .15s ease;

}


.close:hover {

    color:var(--accent);

}




.viewer-nav {

    position:absolute;

    top:50%;


    transform:

        translateY(-50%);


    font-size:70px;

    cursor:pointer;

    user-select:none;

    z-index:1100;

    color:var(--text);

    text-shadow:

        0 0 10px black;

    transition:color .15s ease;

}


.viewer-nav:hover {

    color:var(--accent);

}



.previous {

    left:25px;

}



.next {

    right:25px;

}




/* Settings page */


.settings-row {

    margin-bottom:15px;

}


.settings-row label {

    display:block;

    margin-bottom:5px;

}



section {

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:12px;

    padding:20px 24px;

    margin-bottom:20px;

}


section h2 {

    margin-top:0;

    font-size:20px;

    color:var(--accent);

}



/* Mobile */


@media(max-width:700px) {


    body {

        margin:10px;

    }


    h1 {

        font-size:20px;

    }


    .header-logo {

        height:24px;

    }


    .toolbar {

        gap:5px;

    }


    .toolbar button {

        min-width:auto;

        padding:6px 8px;

        font-size:14px;

        font-weight:700;

    }


    .icon-button {

        width:37px;

        padding:6px !important;

        font-size:19px;

        font-weight:700;

    }


    .gallery {

        grid-template-columns: repeat(2, 1fr);

        gap:8px;

    }


    .card img {

        height:180px;

    }


    .viewer-nav {

        font-size:45px;

    }


}
