* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    all: unset;
    cursor: pointer;
    box-sizing: border-box;
}

body {
    background-color: black;
    margin: 0;
    overflow-x: hidden;
    font-family: "Orbitron", "Courier New", monospace;
    color: white;
    min-height: 100vh;
    font-size: 115%; /* 15% larger base text - matches global.css */
}

a[href^='http']::after {
    content: url('IMAGES/external.png');
    margin-left: 0.25em; /* Adjust spacing */
}

/* MAIN CONTAINER */
.maincontainer {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 20px 80px;
    min-height: 100vh;
    z-index: 1;
}

/* GO BACK BUTTON */
nav {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 100;
}

nav a {
    color: white !important;
    text-decoration: underline !important; /* Matches global.css high-contrast style */
    border: 3px solid white;
    background: black;
    padding: 12px 24px;
    font-weight: bold;
    font-family: "Audiowide", "Courier New", monospace;
    position: relative;
    display: inline-block;
    font-size: 115%; /* 15% larger */
}

nav a:visited {
    color: white !important;
}

nav a:hover {
    background: #1a1a1a !important; /* Matches global.css hover */
    color: white !important;
}

nav a:focus {
    outline: 3px solid white;
    outline-offset: 6px;
}

/* NOISE BUTTON */
.noisebutton {
    position: fixed;
    top: 107px;
    left: 30px;
    color: white;
    border: 3px solid white;
    background: black;
    padding: 12px 24px;
    font-weight: bold;
    font-family: "Audiowide", "Courier New", monospace;
    z-index: 100;
    font-size: 115%; /* 15% larger */
}

.noisebutton:hover {
    background: #1a1a1a; /* Matches global.css hover */
    color: white;
}

.noisebutton:focus {
    outline: 3px solid white;
    outline-offset: 6px;
}

/* ============================================ */
/* ACCESSIBILITY PANEL POSITIONING FOR CONNECT PAGE */
/* ============================================ */
/* Override the default top-left positioning from global.css */
.accessibility-panel {
    top: 184px !important;  /* Position below the noise button (adjusted for larger padding) */
    left: 30px !important;  /* Align with nav and noise button */
}

/* HEADER SECTION */
.header {
    text-align: center;
    margin-bottom: 60px;
}

.title {
    font-family: "Audiowide", "Courier New", monospace;
    font-size: 2.3em; /* Matches global.css h1 scaling */
    color: white;
    letter-spacing: 8px;
    margin-bottom: 20px;
}

.subtitle {
    font-family: "Orbitron", monospace;
    font-size: 0.95rem; /* Matches global.css p scaling */
    color: white;
    letter-spacing: 3px;
}

/* LINKS GRID */
.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 700px;
    margin: 0 auto;
}

/* LINK CARDS - Visible boxes with clear structure */
.link-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 30px 35px;
    background: black;
    border: 3px solid white;
    color: #00d4ff !important; /* Cyan for unvisited links - matches global.css */
    text-decoration: underline !important; /* Matches global.css link style */
    font-family: "Audiowide", "Courier New", monospace;
    text-align: left;
    position: relative;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.link-card:visited {
    color: #0099cc !important; /* Darker blue for visited - matches global.css */
}

.link-card:hover {
    background: #1a1a1a; /* Subtle hover - matches nav hover */
    color: #00d4ff !important;
}

.link-card:visited:hover {
    color: #0099cc !important;
}

.link-card:focus {
    outline: 3px solid white;
    outline-offset: 6px;
    background: #1a1a1a;
}

.link-label {
    font-size: 1.3em; /* Matches global.css h4 scaling */
    font-weight: bold;
    letter-spacing: 3px;
    display: block;
    color: inherit; /* Inherit the link color */
}

.link-detail {
    font-size: 0.95rem; /* Matches global.css p scaling */
    font-family: "Orbitron", monospace;
    letter-spacing: 1px;
    display: block;
    color: inherit; /* Inherit the link color */
}

/* Ensure button link-cards match anchor styling */
button.link-card {
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: #00d4ff !important; /* Same cyan as links */
}

button.link-card:hover {
    background: #1a1a1a;
    color: #00d4ff !important;
}

button.link-card .link-label,
button.link-card .link-detail {
    color: inherit;
}

/* FOOTER */
footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    color: white;
    background: transparent;
    text-align: center;
    padding: 20px;
}

footer p {
    margin: 0;
    padding: 15px;
    background: black;
    font-size: 0.95rem; /* Matches global.css p scaling */
    font-weight: bold;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .maincontainer {
        padding: 100px 15px 60px;
    }
    
    .title {
        font-size: 2em;
        letter-spacing: 4px;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .links-grid {
        max-width: 100%;
    }
    
    .link-card {
        padding: 25px 30px;
    }
}

/* KEYBOARD NAVIGATION ENHANCEMENTS */
a:focus,
button:focus {
    outline: 3px solid white;
    outline-offset: 6px;
}

/* ============================================ */
/* OVERRIDE GLOBAL.CSS HIGH CONTRAST */
/* ============================================ */
/* This must come LAST to override the global.css wildcard selector */

/* Unvisited links - cyan */
body.high-contrast .link-card:link {
    color: #00d4ff !important;
}

/* Visited links - darker blue (more visible than before) */
body.high-contrast .link-card:visited {
    color: #00d4ff !important; /* Keep them cyan like unvisited - easier to see */
}

/* Hover states */
body.high-contrast .link-card:hover {
    color: #00d4ff !important;
}

body.high-contrast .link-card:visited:hover {
    color: #00d4ff !important;
}

/* Labels and details inherit the link color */
body.high-contrast .link-label,
body.high-contrast .link-detail {
    color: inherit !important;
}

/* Button link-cards */
body.high-contrast button.link-card {
    color: #00d4ff !important;
}

body.high-contrast button.link-card:hover {
    color: #00d4ff !important;
}

body.high-contrast button.link-card .link-label,
body.high-contrast button.link-card .link-detail {
    color: inherit !important;
}

/* Extra specificity - force all link-card elements to be cyan */
body.high-contrast a.link-card,
body.high-contrast a.link-card:link,
body.high-contrast a.link-card:visited,
body.high-contrast a.link-card:hover,
body.high-contrast a.link-card:active {
    color: #00d4ff !important;
}

/* Force the spans inside to inherit */
body.high-contrast a.link-card .link-label,
body.high-contrast a.link-card .link-detail {
    color: #00d4ff !important;
}