:root {
    --primary-color: #4a4a4a;
    --secondary-color: #8c8c8c;
    --accent-color: #d1d1d1;
    --background-dark: #1a1a1a;
    --background-glass: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.2);
    --text-main: #e0e0e0;
    --text-sub: #b0b0b0;
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: rgba(255, 255, 255, 0.1);
    --focus-glow: 0 0 15px rgba(255, 255, 255, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--background-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-x: hidden;
}

/* Background & Overlay */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    filter: brightness(0.7) contrast(1.1);
}

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: -1;
    backdrop-filter: blur(3px);
}

/* Main Container */
.main-container {
    width: 100%;
    max-width: 720px;
    background: var(--background-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.form-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.description {
    font-size: 1rem;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.required-note {
    font-size: 0.85rem;
    color: #ff6b6b;
    text-align: right;
    margin-top: 10px;
}

/* Form Sections */
.form-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: var(--border-glass);
    background: rgba(0, 0, 0, 0.3);
}

.form-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 12px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.required {
    color: #ff6b6b;
    margin-left: 4px;
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
    box-shadow: var(--focus-glow);
}

/* Date Input Icon Color */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-sub);
    pointer-events: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

select option {
    background-color: var(--background-dark);
    color: var(--text-main);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

input[type="file"] {
    display: none;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
}

.file-upload-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.file-upload-label .icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.file-name {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-sub);
    min-height: 1.2em;
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.submit-btn {
    background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.clear-btn {
    background: transparent;
    color: var(--text-sub);
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s;
    font-family: var(--font-body);
}

.clear-btn:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

.security-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 20px 10px;
    }

    .main-container {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }
}