:root {
    --primary-red: #dc143c;
    /* Striking Red from logo */
    --accent-red: #d3112e;
    --dark-red: #8b0000;
    --white: #ffffff;
    --off-white: #fcfcfc;
    --silver: #a0a0a0;
    --silver-light: #e0e0e0;
    --text-dark: #2a2a2a;
    --text-muted: #6c757d;
    --black: #1a1a1a;
    --success: #00d23b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Mitr', sans-serif;
}

body {
    background: radial-gradient(circle at top right, var(--off-white), #f0f0f0);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 50px 50px;
    background-image:
        line-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        line-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    z-index: 1;
}

/* Adding actual linear-gradient syntax for the grid */
.background-overlay {
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

.maintenance-container {
    background-color: var(--white);
    max-width: 750px;
    width: 90%;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    text-align: center;
    z-index: 2;
    position: relative;
    border-top: 6px solid var(--primary-red);
}

/* Logo Design */
.logo-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Space between logo and text */
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-red);
    letter-spacing: 1px;
    line-height: 1;
}

.main-logo {
    max-width: 90px;
    /* Increased size */
    height: auto;
}

.text-tech {
    color: var(--text-dark);
}

.logo-underline {
    width: 60px;
    height: 4px;
    background-color: var(--silver);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Tech Animation Setup */
.animation-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.server-rack-animation {
    width: 320px;
    height: auto;
    overflow: visible;
}

/* SVG Shapes */
.rack-body {
    stroke: var(--silver-light);
    fill: #fdfdfd;
    stroke-width: 4;
    rx: 6;
}

.server-unit {
    fill: var(--text-dark);
    rx: 4;
}

.server-port {
    fill: var(--black);
}

.status-light {
    fill: var(--silver);
    animation: normalBlink 2.5s infinite;
}

.status-light-off {
    fill: #444;
}

/* Cable Styles */
.cable-wire {
    fill: none;
    stroke: var(--primary-red);
    stroke-width: 6;
    stroke-linecap: round;
}

.cable-wire-flow {
    fill: none;
    stroke: var(--white);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 10 20;
    opacity: 0;
    /* ID targets animation */
}

.connector-base {
    fill: var(--silver);
}

.connector-tip {
    fill: var(--silver-light);
}

.connector-latch {
    fill: none;
    stroke: #666;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.connector-pin {
    fill: #f1c40f;
}

/* The Central Animations */
#anim-cable-group {
    transform-origin: center;
    animation: plugInMove 4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

#status-light-dynamic {
    fill: #444;
    animation: dynamicLight 4s ease-in-out infinite;
}

#data-flow {
    animation: networkFlow 4s linear infinite;
}

@keyframes plugInMove {

    0%,
    20% {
        transform: translateX(-65px);
    }

    /* Unplugged */
    45%,
    75% {
        transform: translateX(0);
    }

    /* Plugged In */
    90%,
    100% {
        transform: translateX(-65px);
    }

    /* Pull Out */
}

@keyframes dynamicLight {

    0%,
    45% {
        fill: #444;
    }

    /* Off while plugging */
    46%,
    74% {
        fill: var(--success);
    }

    /* Green Connected */
    75%,
    100% {
        fill: #444;
    }

    /* Off while pulling */
}

@keyframes networkFlow {

    0%,
    45% {
        opacity: 0;
        stroke-dashoffset: 100;
    }

    46% {
        opacity: 1;
    }

    74% {
        opacity: 1;
        stroke-dashoffset: 0;
    }

    /* Data flowing to the right (towards server) */
    75%,
    100% {
        opacity: 0;
        stroke-dashoffset: -10;
    }
}

@keyframes normalBlink {

    0%,
    30% {
        fill: var(--silver);
    }

    40%,
    60% {
        fill: var(--primary-red);
    }

    70%,
    100% {
        fill: var(--silver);
    }
}

/* Text Content Area */
.thai-text {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.eng-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.sub-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.footer-info {
    font-size: 0.8rem;
    color: var(--silver);
    margin-top: 20px;
    font-weight: 300;
}

/* Contact Info Styles */
.contact-info {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--silver-light);
}

.contact-info p strong {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.contact-links {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.contact-link,
.contact-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.contact-link:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

.contact-link svg,
.contact-phone svg {
    color: var(--primary-red);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .maintenance-container {
        padding: 40px 20px;
    }

    .logo-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .main-logo {
        max-width: 50px;
    }

    .thai-text {
        font-size: 1.8rem;
    }

    .logo-text {
        font-size: 2rem;
    }

    .server-rack-animation {
        width: 280px;
    }
}