:root {
    --color1: white;
    --color2: white;
    --color3: white;
    --color4: white;
    --bordercolor: #111111;
    --othercolor: black;
}

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

body {
    margin: 0;
    overflow: hidden;
    background-size: cover;
}

a {
    text-decoration: none;
    color: white;
}

/* Main Layout */
#centerbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    z-index: 0;
    color: white;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

/* Clock Display */
#clock-wrapper {
    width: 100%;
    text-align: center;
    margin-bottom: 25px;
}

#clock {
    display: inline-block;
    position: relative;
    margin: 0 auto;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 72px;
    font-weight: bold;
    text-align: center;
}

/* Link Container & Table Styles */
#container {
    display: inline-block;
}

#links {
    margin: 5px;
    border-spacing: 10px;
}

#bg {
    display: inline-block;
    background-color: #262626;
    border: 5px solid var(--bordercolor);
}

#bg td {
    padding: 10px;
}

/* Hover Accent Colors */
#r1 td a:hover { color: var(--color1); }
#r2 td a:hover { color: var(--color2); }
#r3 td a:hover { color: var(--color3); }
#r4 td a:hover { color: var(--color4); }

/* Column Indicators & Borders */
#color1 { color: var(--color1); float: left; }
#color2 { color: var(--color2); float: left; }
#color3 { color: var(--color3); float: left; }
#color4 { color: var(--color4); float: left; }

#header1 { border-right: 3px solid var(--color1); }
#header2 { border-right: 3px solid var(--color2); }
#header3 { border-right: 3px solid var(--color3); }
#header4 { border-right: 3px solid var(--color4); }

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 2px;
    overflow: hidden;
    color: white;
    background: transparent;
    text-shadow: -2px 0 #ff0000;
    clip: rect(0, 900px, 0, 0);
    animation: noise-anim 2s infinite linear alternate-reverse;
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: -2px;
    overflow: hidden;
    color: white;
    background: transparent;
    text-shadow: 2px 0 #0000ff;
    clip: rect(0, 900px, 0, 0);
    animation: noise-anim-2 3s infinite linear alternate-reverse;
}

@keyframes noise-anim {
    0%   { clip: rect(12px, 9999px, 85px, 0); }
    10%  { clip: rect(43px, 9999px, 12px, 0); }
    20%  { clip: rect(89px, 9999px, 34px, 0); }
    30%  { clip: rect(5px, 9999px, 67px, 0); }
    40%  { clip: rect(74px, 9999px, 98px, 0); }
    50%  { clip: rect(21px, 9999px, 15px, 0); }
    60%  { clip: rect(63px, 9999px, 79px, 0); }
    70%  { clip: rect(32px, 9999px, 41px, 0); }
    80%  { clip: rect(95px, 9999px, 5px, 0); }
    90%  { clip: rect(50px, 9999px, 91px, 0); }
    100% { clip: rect(18px, 9999px, 58px, 0); }
}

@keyframes noise-anim-2 {
    0%   { clip: rect(76px, 9999px, 12px, 0); }
    15%  { clip: rect(22px, 9999px, 94px, 0); }
    30%  { clip: rect(51px, 9999px, 33px, 0); }
    45%  { clip: rect(8px, 9999px, 78px, 0); }
    60%  { clip: rect(88px, 9999px, 45px, 0); }
    75%  { clip: rect(29px, 9999px, 19px, 0); }
    90%  { clip: rect(64px, 9999px, 87px, 0); }
    100% { clip: rect(41px, 9999px, 60px, 0); }
}

/* Search Wrapper & Typing Animation */
.search-wrapper {
    position: relative;
    display: inline-block;
    font-family: inherit;
    font-size: 1.5rem;
}

.search-wrapper input {
    position: relative;
    z-index: 2;
    width: 320px;
    color: #ffffff;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    caret-color: transparent;
}

.typing-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100%;
    color: rgba(61, 60, 58, 0.50);
    white-space: nowrap;
    pointer-events: none;
}

.typing-placeholder.blinking::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}