@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

body {
    background-color: #1a1a2e; /* Fallback background */
    /* Layered background: gradient under noise */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%233a3a5e' fill-opacity='0.1' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"),
        radial-gradient(circle, #2a2a3e 0%, #1a1a2e 70%);
    color: #ffffff; /* White text */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Fallback font */
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 60px; /* Ensure space for footer */
    box-sizing: border-box;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    color: #00f5a0; /* Turquoise highlight */
    text-align: center;
    margin-bottom: 10px; /* Reduced margin */
    text-shadow: 0 0 8px #00f5a0; /* Added glow */
}

h2 {
    font-family: 'Orbitron', sans-serif;
    color: #00d9ff; /* Blue highlight */
    text-align: center;
    font-weight: normal;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Style for the new h3 directly under body */
body > h3 {
    color: #a370f7; /* Purple highlight */
    text-align: center;
    font-weight: normal;
    font-size: 1.1em; /* Smaller than h2 */
    margin-top: -15px; /* Pull it closer to h2 */
    margin-bottom: 25px;
    font-family: 'Orbitron', sans-serif; /* Keep the theme font */
}

.description {
    text-align: center;
    max-width: 600px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #e0e0e0; /* Slightly dimmer white */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px; /* Max width for the controls and graph area */
}

.input-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between input and buttons */
    margin-bottom: 20px;
    width: 100%;
}

#axis-description {
    padding: 10px 15px;
    flex-grow: 1; /* Take available space */
    min-width: 250px; /* Prevent getting too small */
    max-width: 500px;
    border: 2px solid #00d9ff; /* Blue border */
    background-color: #2a2a3e; /* Slightly lighter dark */
    color: #ffffff;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#axis-description::placeholder {
    color: #cccccc;
}

#axis-description:focus {
    outline: none;
    border-color: #00f5a0; /* Turquoise focus border */
    box-shadow: 0 0 8px #00f5a0; /* Turquoise focus glow */
}

/* Button Base Styles */
#generate-button, #copy-link-button {
    padding: 12px 20px;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1rem; /* Slightly smaller for better fit */
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    flex-shrink: 0; /* Prevent buttons from shrinking too much */
}

/* Generate Button Specifics */
#generate-button {
    background: linear-gradient(45deg, #a370f7, #00d9ff); /* Purple-to-blue gradient */
}

#generate-button:hover {
    background: linear-gradient(45deg, #8e5cdb, #00bfff); /* Darker gradient on hover */
    box-shadow: 0 0 15px #00f5a0; /* Turquoise glow on hover */
}

#generate-button:active {
    transform: scale(0.98); /* Click effect */
}

/* Copy Link Button Specifics */
#copy-link-button {
    background-color: #3a3a5e; /* Darker, less prominent */
    border: 1px solid #00d9ff;
}

#copy-link-button:hover {
    background-color: #4a4a6e;
    border-color: #00f5a0;
}

#copy-link-button:active {
    transform: scale(0.98);
}

#graph-container {
    position: relative; /* Needed for absolute positioning of loading indicator */
    width: 100%;
    min-height: 400px; /* Ensure minimum height */
    height: 50vh; /* Use viewport height */
    max-height: 600px;
    background-color: #2a2a3e; /* Match input background */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px; /* Space before examples */
    border: 1px solid transparent;
    border-image: linear-gradient(to bottom right, #00f5a0aa, #a370f7aa) 1; /* Subtle gradient border */
    overflow: hidden; /* Ensure content respects border radius */
}

#loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(42, 42, 62, 0.8); /* Semi-transparent overlay */
    color: #00f5a0;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Ensure it's above the graph */
    font-family: 'Orbitron', sans-serif;
}

.examples {
    margin-top: 30px; /* Space after graph */
    width: 90%;
    max-width: 700px; /* Slightly wider */
    text-align: center;
    color: #cccccc;
}

.examples h3 {
    font-family: 'Orbitron', sans-serif;
    color: #a370f7; /* Purple highlight */
    margin-bottom: 15px; /* More space */
}

.examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.examples li {
    display: inline-block;
    background-color: #2a2a3e;
    border: 1px solid #00d9ff;
    padding: 5px 10px;
    margin: 5px 8px; /* More horizontal space */
    border-radius: 4px;
    font-size: 0.9em;
    color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.examples li:hover {
    background-color: #3a3a5e; /* Darker hover */
    border-color: #00f5a0; /* Turquoise border hover */
}

footer {
    position: absolute; /* Keep at bottom */
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.2); /* Slight background */
    color: #aaaaaa;
    font-size: 0.9em;
    margin-top: 40px; /* Ensure space from content */
}

footer p {
    margin: 0;
}

footer a {
    color: #00f5a0; /* Turquoise link */
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff;
}
