:root {
    --pink: #D60270;
    --purple: #9B4F96;
    --blue: #0038A8;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #f0f0f0;
    --accent: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
    --surface-hov: #262626;
}

@font-face {
    font-family: 'ngnl';
    src: url('static/font/ngnl_font.ttf');
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

*::selection,
*::-moz-selection {
    background-color: black;
    color: var(--text-main);
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    padding-bottom: 120px;
}

/* Header styling */
.color-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.color-header header {
    text-align: center;
    padding: 40px 20px 20px;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.color-header h1 {
    font-family: 'ngnl', sans-serif;
    font-size: 3rem;
    margin: 0;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.intro {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #ccc;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.card {
    background-color: var(--bg-card);
    border: 2px solid var(--pink);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--purple);
}

/* Gallery grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.gallery img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(214, 2, 112, 0.3);
    border-color: var(--pink);
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.modal-header {
    position: absolute;
    top: 15px;
    right: 20px;
    width: calc(100% - 40px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 85%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 8px;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    transition: transform 0.3s ease, opacity 0.3s ease;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center center;
    cursor: inherit;
    border-radius: 8px;
}

.modal-image.loaded {
    opacity: 1;
}

.modal-image.zoomed {
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease, cursor 0.3s ease;
}

.modal-image.zoomed.grabbing {
    cursor: grabbing;
}

.close {
    color: var(--text-main);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 8px;
}

.close:hover,
.close:focus {
    color: var(--pink);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: var(--text-main);
    font-weight: bold;
    font-size: 32px;
    border: none;
    background: rgba(30, 30, 30, 0.8);
    user-select: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.prev:hover, .next:hover {
    color: var(--pink);
    background: rgba(30, 30, 30, 0.95);
    transform: scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.modal-controls {
    display: flex;
    gap: 10px;
}

.modal-controls button {
    background-color: var(--pink);
    color: var(--text-main);
    border: 2px solid var(--purple);
    padding: 10px 20px;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.modal-controls button:hover {
    background-color: var(--purple);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 79, 150, 0.4);
}

.modal-caption {
    text-align: center;
    color: #ccc;
    margin-top: 15px;
    font-size: 18px;
}

/* Download icon styling */
.download-icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.download-icon:hover {
    transform: scale(1.2);
    filter: invert(14%) sepia(93%) saturate(7496%) hue-rotate(316deg) brightness(97%) contrast(93%);
}

/* Footer styles */
.footer {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-top: 2px solid var(--accent);
    padding: 0px 20px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.visit-counter {
    text-align: center;
    padding: 4px 8px;
    border-radius: 20px;
    background: var(--bg-dark);
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.git {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    text-decoration: none;
    color: var(--text-main);
}

.git:hover {
    background: var(--accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.6s ease;
}

.git:hover .git-logo {
    background: var(--accent);
    mask: url('/static/resources/git-logo.svg') no-repeat center;
    mask-size: contain;
    -webkit-mask: url('/static/resources/git-logo.svg') no-repeat center;
    -webkit-mask-size: contain;
    filter: none;
}

.git-label {
    font-size: 14px;
    font-weight: 500;
}

.git-logo {
    width: 20px;
    height: 20px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
    transition: all 0.6s ease;
}

/* Links */
a {
    text-decoration: none;
    color: var(--pink);
    transition: color 0.3s ease;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 15px;
        padding-bottom: 90px;
    }
    
    .color-header h1 {
        font-size: 2.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery img {
        height: 180px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .prev, .next {
        font-size: 28px;
        padding: 15px;
    }
    
    .modal-controls button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .modal-caption {
        font-size: 16px;
    }
    
    .footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 8px 20px;
    }
    
    .footer-main {
        order: 1;
        flex: none;
    }
    
    .git {
        order: 2;
        flex: none;
    }
    
    .visit-counter {
        padding: 3px 6px;
        font-size: 12px;
    }
    
    .git-label {
        font-size: 12px;
    }
    
    .git-logo {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .color-header h1 {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        top: 10px;
        right: 15px;
    }
    
    .close {
        font-size: 32px;
    }
}