:root {
    --background-dark: #1a1a1a;
    --surface-dark: #2d2d2d;
    --primary-color: #4CAF50;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
    --input-background: #333333;
    --border-color: #444444;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 16px;
    user-select: none;
}

h1 {
    font-size: 3rem;
    color: var(--text-color);
    text-align: center;
    background: linear-gradient(90deg, var(--primary-color), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 20px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    margin: 20px auto;
    width: fit-content;
}

h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
    pointer-events: none;
}

h1:hover::before {
    transform: translateX(0);
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.middle {
    background: var(--surface-dark);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Enhanced h2 styling */
h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.8rem;
    margin: 1.5rem 0;
    font-weight: 600;
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.05);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color) 0%, rgba(22, 160, 40, 0.2) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: underlineAppear 0.8s ease-out forwards;
}

h2:hover::after {
    width: 70%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

input[type="password"],
input[type="text"],
.dynamic-input {
    width: 90%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: var(--input-background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1.2rem;
}

input[type="password"]:focus,
input[type="text"]:focus,
.dynamic-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

button:hover {
    background-color: #3d8b40;
}

.radio-group {
    margin: 1rem 0;
    display: flex;
    gap: 2rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface-dark);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 2px solid var(--border-color);
}

.popup select {
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 0;
    background-color: var(--input-background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1.1rem;
}

.dynamic-label {
    width: 90%;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--input-background);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.suggestions {
    background: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    color: var(--text-color);
}

.file-name {
    margin-left: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

#submitBtn {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: var(--primary-color);
}

#submitBtn:hover {
    background-color: #3d8b40;
}

/* High contrast focus states */
input[type="radio"]:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .fancy-title {
        font-size: 2rem;
    }

    .fancy-title::before,
    .fancy-title::after {
        width: 80px;
    }

    h2 {
        font-size: 1.5rem;
        padding-bottom: 0.6rem;
    }

    h2::after {
        height: 2px;
    }

    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    body {
        font-size: 18px;
    }
}

/* Better visibility for placeholder text */
::placeholder {
    color: #888888;
    opacity: 1;
}