html {
    height: 100%;
    min-height: 100%;
    background: #000;
}

body {
    position: relative;
    font-family: Arial, sans-serif;
    height: 100%;
    margin: 20px;
    min-height: 100dvh;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 100dvh;
    background-image: url("images/background.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

body::after {
    content: "";
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
    filter: blur(24px);
    transform: scale(1.3);
    pointer-events: none;
}

main {
    max-width: 980px;
    margin: 0 auto;
}

.repo-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top left,
            rgba(255,255,255,0.06),
            transparent 60%
        );
    pointer-events: none;
}

.repo-header {
    max-width: 900px;
    margin: 40px auto 32px auto;
    padding: 40px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 24px;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.repo-header h1 {
    margin: 0;
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 700;
    color: white;
}

.repo-header p {
    margin-top: 8px;
    font-size: 18px;
    color: rgba(255,255,255,0.75);
}

@media (max-width: 768px) {
    .repo-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .repo-btn,
    .repo-link {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

.repo-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.repo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.05);
    backdrop-filter: blur(16px);
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.repo-btn:hover {
    transform: translateY(-2px);
    background: #89eed3;
    border-color: rgba(5,255,193,0.25);
    color: black;
}

.repo-actions button:hover {
    transform:  translateY(-2px);
    background: #89eed3;
    border-color: rgba(5, 255, 193, 0.25);
}

.repo-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(0,0,0,0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.75);
    font-family: monospace;
    font-size: 12px;
    transition: background 0.2s ease,
                transform 0.2s ease;
}

.repo-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.featured-tweak::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top left,
            rgba(255,255,255,0.1),
            transparent 65%
        );
    pointer-events: none;
}

.featured-tweak {
    max-width: 925px;
    margin: 0 auto 32px auto;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
}

.featured-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.featured-label {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 10px;
}

.featured-content h2 {
    font-size: 38px;
    color: white;
    margin: 0 0 12px 0;
}

.featured-content p {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255,255,255,0.75);
    max-width: 500px;
}

.featured-tweak img {
    width: 350px;
    border-radius: 24px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.featured-tweak:hover img {
    transform: scale(1.03);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.35);
}

@media (max-width: 768px) {
    .featured-tweak {
        flex-direction: column;
        text-align: center;
    }
    .featured-content p {
        max-width: none;
    }
}

.tweak-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

main h2 {
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}   

.card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                border-color 0.2s ease;
    box-shadow:
            0 8px 24px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 50px;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.8em;
    padding: 3px 10px;
    align-self: flex-start;
    margin-left: -2px;
    margin-top: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.75);
}

.tweak-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

a h3 {
    font-size: 22px;
    color: white;
    margin: 0 0 6px 0;
}

a p {
    font-size: 14px;
    color: rgba(225,225,225,0.75);
    margin: 4px 0;
}

footer {
    margin-top: 48px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}


/*===============
   Tweak Pages
================*/

.tweak-page {
    max-width: 720px;
    margin: auto;
    padding: 40px 12px;
}

@media (max-width: 600px) {
    main,
    .tweak-page {
        max-width: 100%;
        padding: 16px;
    }
}

.tweak-header {
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.25),
        inset 0 -1px 0 rgba(0,0,0,0.05);
}

.tweak-header h1 {
    color: #eee;
    font-size: 32px;
    margin: 0 0 6px 0;
}

.subtitle {
    font-size: 14px;
    color: #f5f5f5;
    margin: 0 0 12px 0;
}

.tweak-header p {
    color: #e6e6e6;
    margin-bottom: 12px;
}

.badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.badges span {
    font-size: 12px;
    color: #f5f5f5;
    padding: 4px 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(0.15);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
}

.install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    border: none;
    background: #89eed3;
    color: black;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.install-btn:hover {
    transform: translateY(-2px);
}

.card:active,
.repo-btn:active,
.install-btn:active {
    transform: scale(0.98);
}

.screenshot-row {
    overflow-x: auto;
    padding: 0 16px;
    scroll-padding-left: 16px;
    scroll-snap-type: x mandatory;
}

.screenshot-track {
    display: flex;
    gap: 12px;
    width: max-content;
    margin: 0 auto;
}

.screenshot-track:has(.screenshot:hover) .screenshot {
    opacity: 1;
    transform: scale(1);
}

.screenshot {
    flex: 0 0 auto;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: center;
    filter: blur(0.2px);
    opacity: 0.9;
    transform: scale(0.98);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -1px 0 rgba(255,255,255,0.05);
}

.screenshot img {
    width: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.screenshot:hover {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    touch-action: pan-x;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    opacity: 0;
    visibility: hidden;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
    height: 100%;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 80%;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    border-radius: 12px;
}

.modal-content.changing {
    opacity: 0;
    transform: scale(0.85);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100000;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 24px;
    cursor: pointer;
        transition:
        transform 0.2s ease, background 0.2s ease;
}

@media (max-width: 768px) {
    .modal-nav {
        width: 44px;
        height: 44px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 1002;
    }
    .prev {
        left: 16px;
    }
    .next {
        right: 16px;
    }
}

.modal-nav:hover {
    transform: translateY(-50%) scale(1.08);
}

.prev {
    left: 16px;
    color: white;
}

.next {
    right: 16px;
    color: white;
}

.tweak-meta {
    margin-top: 12px;
    margin-left: 4px;
    margin-right: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.tweak-meta span {
    color: white;
    font-weight: 500;
    margin-right: 4px;
}

.tweak-desc h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.tweak-section {
    max-width: 800px;
    margin: 18px auto;
    background: rgba(0, 0, 0, 0.075);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -1px 0 rgba(0,0,0,0.05);
    padding: 24px 16px;
}

.tweak-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 2px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
 
.tweak-section h3 {
    font-size: 14px;
    font-weight: 200;
    margin-top: 20px;
    margin-bottom: 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tweak-section p {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.tweak-section ul {
    margin-top: 8px;
    margin-bottom: 0px;
    padding-left: 18px;
}

.tweak-section li {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.75);
}

.github-link {
    color: #89eed3
}

.github-link:visited{
    color: #89eed3;
}

.twitter-link {
    color: #89eed3
}

.twitter-link:visited{
    color: #89eed3;
}

.email-link {
    color: #89eed3
}

.email-link:visited{
    color: #89eed3;
}

.youtube-link {
    color: #89eed3
}

.youtube-link:visited{
    color: #89eed3;
}