/* Base Styling for Hacker Terminal Look */
body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #000;
    color: #00FF00;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Heading */
h1 {
    font-size: 3rem;
    color: #00FF00;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
}

/* Container Styling */
.container {
    max-width: 1200px;
    width: 90%;
    margin-top: 30px;
    padding: 30px;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Section Headers */
.section h2 {
    font-size: 1.8rem;
    color: #00FF00;
    margin-bottom: 20px;
    font-weight: 500;
    text-shadow: 0 0 10px #00FF00;
}

/* Form Elements */
label, select, input, button {
    font-size: 1rem;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #00FF00;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    color: #00FF00;
    background-color: #111;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #00FF00;
    box-shadow: 0 0 10px #00FF00;
    background-color: #222;
}

/* Buttons */
button {
    background-color: #333;
    color: #00FF00;
    border: 1px solid #00FF00;
    cursor: pointer;
    padding: 14px;
    font-size: 1.1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 0 5px #00FF00;
}

button:hover {
    background-color: #444;
    transform: scale(1.05);
    box-shadow: 0 0 15px #00FF00;
}

button:active {
    transform: scale(0.98);
}

/* Table Styling */
/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 1.2rem;
    overflow-x: auto; /* Enable horizontal scrolling */
    table-layout: fixed; /* Ensures columns don't stretch beyond the table's width */
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #00FF00;
    word-wrap: break-word; /* Ensures long words break into the next line */
}

th {
    background-color: #222;
    color: #00FF00;
    font-weight: bold;
    text-shadow: 0 0 5px #00FF00, 0 0 10px #00FF00;
}

td {
    background-color: #111;
    color: #00FF00;
}

tr:hover td {
    background-color: #333;
    transition: background-color 0.2s ease;
}

/* Ensure the table container is scrollable horizontally on small screens */
@media screen and (max-width: 768px) {
    .container {
        overflow-x: auto;
        padding: 10px;
    }

    table {
        width: 100%;
        display: block; /* Make the table block level for scrollability */
        overflow-x: auto; /* Enable horizontal scroll */
    }
}

/* Output Section */
.output {
    margin-top: 20px;
    padding: 10px;
    background-color: #222;
    border-radius: 8px;
    width: 50%;
    text-align: center;
    color: #00FF00;
    text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
}

/* Loader with Hacking Theme */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader h1 {
    font-size: 3rem;
    color: #00FF00;
    text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
    animation: glow 2s infinite alternate;
}

/* Loader Animations */
@keyframes glow {
    0% {
        text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
    }
    50% {
        text-shadow: 0 0 20px #00FF00, 0 0 40px #00FF00;
    }
    100% {
        text-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00;
    }
}

/* Smooth Transitions and Hover States */
* {
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Media Queries for Smaller Devices */
@media screen and (max-width: 1200px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        margin: 20px;
        padding: 25px;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    label, select, input, button {
        font-size: 1rem;
        padding: 10px;
    }

    table, th, td {
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .container {
        margin: 15px;
        padding: 20px;
    }

    .section h2 {
        font-size: 1.4rem;
    }

    label, select, input, button {
        font-size: 0.95rem;
        padding: 8px;
    }

    button {
        font-size: 1rem;
    }

    table, th, td {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }

    .container {
        margin: 10px;
        padding: 15px;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    label, select, input, button {
        font-size: 0.9rem;
        padding: 6px;
    }

    button {
        font-size: 0.95rem;
    }

    table, th, td {
        font-size: 0.95rem;
    }
}
