* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #83a3b2;
    background-image: url('/imgs/macG4.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, Arial, sans-serif;
}

canvas {
    display: block;
}

.overlayText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: whitesmoke;
    text-align: left;
}

.welcomeText {
    font-size: 40px;
    margin-bottom: 20px;
}

#intro {
    font-size: 13px;
}

.Links {
    margin-top: 20px;      
    text-align: center;     
    font-size: 13px;       
}

/* Right-align links for RTL (Arabic) pages */
body[dir="rtl"] .Links {
    text-align: right;
}

.redirects {
    display: block;
    text-align: left;
    color: whitesmoke;
    text-decoration: none;
    position: relative;
    margin-top: 20px;
    transition: background 250ms ease, color 200ms ease, transform 200ms ease;
}
.redirects::before {
    content: ": ";
}
.redirects:hover {
    /* gradient top -> middle -> bottom: #6faae3, #458ad5, #296ec2 */
    background-image: linear-gradient(to bottom, #6faae3 0%, #458ad5 50%, #296ec2 100%);
    color: whitesmoke;
}
.redirect {
    color: whitesmoke;
}

/* Finder UI */
.finder-launcher { position: relative; top: 28px; right: 10px; text-align: right; z-index: 2100; }
.finder-icon {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
}
.finder-icon svg, .finder-icon img { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); display:inline-block; vertical-align:middle; }

.finder-modal {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2000;
}
.finder-modal.active { display: flex; }
.finder-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.finder-window {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #f6f6f6;
    border-radius: 8px;
    padding: 0; /* titlebar is flush with window */
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    color: #222;
}
.finder-titlebar {
    display:flex;
    align-items:center;
    gap:12px;
    padding:6px 12px; /* thinner titlebar */
    border-top-left-radius:8px;
    border-top-right-radius:8px;
    background: linear-gradient(to bottom, #d7d7d7 0%, #b4b4b4 50%, #afafaf 100%);
    border-bottom: 1px solid #1f1f1f; /* very dark gray line */
}
.finder-red-close {
    width:12px;
    height:12px;
    border-radius:50%;
    position:relative;
    overflow:hidden;
    /* darker rim with glossy gradient */
    background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.45) 6%, transparent 12%), linear-gradient(#ff8b78, #ff4b3a);
    border: 1px solid #c23128;
    box-shadow: 0 1px 0 rgba(0,0,0,0.25), inset 0 -2px 4px rgba(0,0,0,0.18);
    cursor:pointer; padding:0; display:inline-block;
}
.finder-red-close::after{
    content: '';
    position: absolute;
    left: 22%; top: 18%;
    width: 46%; height: 36%;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    filter: blur(0.6px);
    pointer-events: none;
    mix-blend-mode: screen;
}
.finder-red-close:hover{ transform: translateY(-1px); }
.finder-title { font-weight:600; color:#222; margin-left:6px; font-size:13px; }
.finder-header { padding: 12px 18px; }
.finder-folders { padding: 0 18px; }
.finder-grid { padding: 0 18px 18px; }
.finder-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.finder-folders { display:flex; gap:14px; flex-wrap:wrap; }
.finder-folder { width:100px; padding:4px 6px; background:transparent; border:none; border-radius:6px; text-align:left; cursor:pointer; display:flex; flex-direction:column; align-items:flex-start; }
.finder-folder img { width:48px; height:36px; object-fit:contain; border-radius:3px; background:transparent; }
.finder-folder > div { margin-top:6px; font-size:12px; color:#222; }
.finder-folder:hover { transform: translateY(-4px); }
.finder-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap:12px; margin-top:14px; }
.finder-thumb { background: linear-gradient(to bottom, #d7d7d7 0%, #b4b4b4 50%, #afafaf 100%); border:1px solid #bdbdbd; padding:6px; border-radius:2px; cursor:pointer; }
.finder-thumb img{ width:100%; height:120px; object-fit:cover; border-radius:2px; display:block; background:transparent; box-shadow: 0 8px 24px rgba(0,0,0,0.65); }
.finder-close { background:#333; color:#fff; border:none; padding:6px 10px; border-radius:4px; cursor:pointer; }


/* Footer license: pin to bottom and avoid covering content */
footer.license {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #d7d7d7 0%, #b4b4b4 50%, #afafaf 100%);
    border: 1px solid #000;
    color: whitesmoke;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    z-index: 1000;
}

/* ensure page content isn't hidden behind the fixed footer */
body {
    padding-bottom: 50px;
}

/* visitor counter appearance inside footer */
.visitor-counter {
    margin-top: 6px;
    font-size: 13px;
    color: #f1f1f1;
}
.visitor-counter #visitor-count {
    font-weight: 700;
    margin-left: 6px;
}
