/* Custom fonts */
@font-face {
    font-family: 'Papyrus';
    src: url('fonts/papyrus.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Trebuchet MS, Arial, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2rem;
    font-weight: normal;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 16px;
}

a:hover {
    text-decoration: underline;
}

a {
    color: #000;
    text-decoration: none;
}

/* Header */

#back-to-home {
    display: block;
    margin-bottom: 2em;
}

.header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 2em;
    gap: 1em;
}

.header h1 {
    margin-bottom: -.15em;
}

#logo {
    width: 4em;
    height: 4em;
}

/* Screenshots */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 40px;
}

.screenshot-item {
    cursor: pointer;
    background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
    border-radius: 1rem;
    box-shadow: 0rem .5rem 1rem rgba(0, 0, 0, 0.12);
    transition: filter 0.2s ease;
}

.screenshot-item:hover {
    filter: brightness(1.05);
}

.screenshot-item:active {
    filter: brightness(0.95);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: .6rem;
}

/* Description */
.description {
    margin-bottom: 40px;
    font-size: .9rem;
}

.description p {
    margin-bottom: 16px;
}

/* Download buttons */
.download-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.download-btn {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.download-btn:hover {
    text-decoration: none;
    /* transform: scale(1.02); */
    filter: brightness(1.05);
}

.download-btn:active {
    filter: brightness(0.95);
}

.download-btn-icon {
    width: 5rem;
    object-fit: contain;
    position: relative;
    z-index: 2;
    margin-right: -30px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.download-btn-text {
    background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
    font-family: "Papyrus", "Times New Roman", serif;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    padding: .6rem 1rem .4rem 2.5rem;
    box-shadow: 0rem .25rem 1rem rgba(0, 0, 0, 0.12);
    max-width: 12rem;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.download-btn:hover .download-btn-sub {
    text-decoration: underline;
    text-underline-offset: 0.08rem;
    text-decoration-style: dotted;
    text-decoration-thickness: 0.005rem;
    text-decoration-color: #888;
}

.download-btn-main {
    font-size: 1.2rem;
    color: #1a1a1a;
    font-weight: normal;
}

.download-btn-sub {
    font-size: .7rem;
    color: #888;
    text-decoration-color: #888;
}

.safari-note {
    font-family: "Papyrus", "Times New Roman", serif;
    text-align: center;
    font-size: .7rem;
    color: #888;
    margin-bottom: 4rem;
}

/* Labels section */
.labels-section {
    border-top: 1px solid #ddd;
    padding-top: 40px;
}

.labels-section p {
    margin-bottom: 24px;
    color: #666;
}

/* Add label form */
.add-label-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.add-label-form input {
    flex: 1;
    min-width: 250px;
    padding: .6rem 1rem;
    background: linear-gradient(to bottom, #e8e8e848, #d8d8d82f);
    border: none;
    border-radius: 1rem;
    box-shadow: inset 0rem .15rem .5rem rgba(0, 0, 0, 0.1);
    font-size: .9rem;
    font-family: inherit;
    color: #1a1a1a;
}

.add-label-form input::placeholder {
    color: #888;
}

.add-label-form input:focus {
    outline: none;
    box-shadow: inset 0rem .15rem .5rem rgba(0, 0, 0, 0.15);
}

.add-label-form button {
    display: flex;
    align-items: center;
    gap: .2rem;
    padding: .6rem 1.5rem;
    background: linear-gradient(to bottom, #fff, #d8d8d882);
    box-shadow: 0rem .25rem .5rem rgba(0, 0, 0, 0.09);
    color: #1a1a1a;
    border: none;
    border-radius: 1rem;
    font-size: .9rem;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.add-label-form button svg {
    flex-shrink: 0;
}

.add-label-form button:hover {
    filter: brightness(1.05);
}

.add-label-form button:active {
    filter: brightness(0.95);
}

/* Labels list */
.labels-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem 1rem .6rem .6rem;
    border-radius: 1rem;
    background: linear-gradient(to bottom, #e8e8e81f, #d8d8d833);
    box-shadow: 0rem .25rem 1rem rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
    transition: filter 0.2s ease;
    flex-grow: 1;
    flex: 0 0 auto;
}

.label-item:hover {
    filter: brightness(1.05);
    text-decoration: none;
}

.label-item:active {
    filter: brightness(0.95);
}

.label-logo {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border-radius: .5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.label-logo-placeholder {
    width: 3rem;
    height: 3rem;
    background: #f0f0f0;
    border-radius: .5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.label-logo-placeholder svg {
    width: 70%;
    height: 70%;
    fill: #b3b3b3;
}

.label-info {
    flex: 1;
    line-height: 1.2;
    width: max-content;
}

.label-name {
    font-weight: bold;
    color: #1a1a1a;
}

.label-url {
    color: #888;
    font-size: .7rem;
}

.label-item:hover .label-url {
    text-decoration: underline;
    text-underline-offset: 0.08rem;
    text-decoration-style: dotted;
    text-decoration-color: #888;
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Changelog */
.changelog {
    border-top: 1px solid #ddd;
    padding-top: 40px;
    margin-top: 40px;
}

.changelog h2 {
    margin-bottom: 1.5rem;
}

.version {
    margin-bottom: 1.5rem;
}

.version h3 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.version .release-date {
    font-size: .8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.version ul {
    margin-left: 1.25rem;
    color: #444;
    font-size: .9rem;
    list-style: inside;
}

.version li {
    margin-bottom: 0.25rem;
}

/* Modal styles */
.screenshot-modal,
.modal-close,
.modal-nav {
    background: rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 1.25rem;
    box-shadow: 0rem 1rem 3rem rgba(0, 0, 0, 0.2);
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: .75rem;
}

.modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    color: #1a1a1a;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0rem .25rem .75rem rgba(0, 0, 0, 0.15);
    transition: filter 0.2s ease;
}

.modal-close:hover {
    filter: brightness(1.05);
}

.modal-close:active {
    filter: brightness(0.95);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #1a1a1a;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0rem .25rem 1rem rgba(0, 0, 0, 0.15);
    transition: filter 0.2s ease;
    z-index: 10;
}

.modal-nav:hover {
    filter: brightness(1.05);
}

.modal-nav:active {
    filter: brightness(0.95);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 20px 15px;
    }
    
    .download-buttons, .add-label-form {
        flex-direction: column;
        align-items: center;
    }
    
    .add-label-form input {
        width: 100%;
    }

    .label-item {
        width: 100%;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    .modal-close {
        top: -8px;
        right: -8px;
        width: 28px;
        height: 28px;
        font-size: .9rem;
    }
} 