:root {
    --bg-black: #0a0a0a;        /* Main background */
    --card-bg: #141414;        /* Surface color for boxes */
    --primary-purple: #8a2be2; /* Main brand color */
    --secondary-blue: #00d4ff; /* Accent color for specs/details */
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --error-red: #ff4444;      /* Used for "Stop" actions */
    --success-green: #00ff88;  /* Used for "Online" status dots */
}

/* --- GLOBAL RESET --- 
   Removes default browser spacing and sets the base font.
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* --- LAYOUT --- */
body {
    background-color: var(--bg-black);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- VM MONITOR (Sidebar) --- 
   The 'fixed' position ensures this box stays in the top-right corner 
   even if the user scrolls down.
*/
#vm-monitor {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid #333;
    border-left: 3px solid var(--primary-purple);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 9999; /* Keeps it on top of all other elements */
    text-align: left; /* Ensures text stays left-aligned */
}

.mon-title {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
}

.mon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 0.9rem;
}

.mon-item span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mon-specs {
    color: var(--secondary-blue);
    font-weight: 500;
}

/* --- STATUS DOT --- 
   This creates the glowing "Online" indicator.
*/
.dot {
    height: 7px;
    width: 7px;
    background: var(--success-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success-green); /* The "glow" effect */
}

/* --- NAVIGATION --- */
.navbar {
    padding: 2rem 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 2.5rem;
    color: var(--primary-purple);
    text-decoration: none;
}

.logo img 
   { height: 140px; }

/* --- Deploy Server Section --- */
.hero-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- CONTAINERS & HEADERS --- */
.form-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #333;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-purple), var(--secondary-blue)); /* This creates the fancy purple-to-blue text gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-msg {
    color: var(--text-gray);
    margin-bottom: 20px;
}


/* --- INTERACTIVE ELEMENTS (Buttons & Inputs) --- */
.btn-primary {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease; /* Makes the hover effect smooth */
    text-decoration: none;
    margin-top: 15px;
}

/* --- INTERACTIVE ELEMENTS (Buttons & Inputs) --- */
.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.btn-stop {
    background: #2a1010;
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.btn-stop:hover {
    background: var(--error-red);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #333;
}

/* --- PROGRESS & COMPONENTS --- */
.ip-badge {
    background: #1f1f1f;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
    color: var(--secondary-blue);
    font-family: monospace;
    font-size: 1.1rem;
    margin: 15px 0;
    display: none; 
}

/* --- ANIMATION COMPONENTS --- */
.progress-container {
    width: 100%;
    background: #1f1f1f;
    border-radius: 10px;
    height: 12px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #333;
}

.progress-bar {
    /* This bar is controlled by the JavaScript in provision.php */
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-blue));
    transition: width 1s linear; /* Ensures the bar grows smoothly */
}

.timer-highlight {
    color: var(--secondary-blue);
    font-weight: bold;
    margin-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left; /* Aligns labels to the left above the boxes */
}

label {
    display: block; /* Makes label sit on its own line */
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
}

select {
    /* Styles the dropdown menus to match the dark theme */
    width: 100%; /* Makes dropdown fill the container */
    padding: 12px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    outline: none;
    cursor: pointer;
    appearance: none; /* Removes the default browser arrow */
}

select:focus {
    border-color: var(--primary-purple);
}

/* --- MOBILE RESPONSIVE DESIGN --- */
@media screen and (max-width: 600px) {
    /* Set the container to flex and column mode */
    .navbar {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px 10px;
        order: 1 !important; 
    }

    /* Force the Monitor to the BOTTOM (of the navbar area) */
    #vm-monitor {
        order: 2 !important;
        position: static !important; /* Keeps it in the stack, not floating */
        width: 90% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        border-left: none !important;
        border-top: 3px solid var(--primary-purple) !important;
    }

    /* Adjust the logo image size for mobile */
    .logo img {
        height: 80px !important;
    }

    .form-container {
        width: 95% !important;
        padding: 20px !important;
        margin-top: 20px !important;
    }
}
