:root {
    --primary: #2c3e50;
    --primary-hover: #1a252f;
    --bg-light: #f5f7fa;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #1a1c2c;
    --text-muted: #6c757d;
    --input-bg: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Background Image with Overlay */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, var(--bg-light) 100%);
    z-index: -1;
}

.container {
    max-width: 800px;
    width: 100%;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 15px;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

.header-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.target-info {
    background: rgba(188, 188, 188, 0.05);
    border: 1px solid rgba(50, 50, 50, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    position: relative;
}

.target-label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #fff;
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.target-companies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.target-companies li {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.target-companies li::before {
    content: "•";
    color: var(--primary);
    margin-right: 8px;
    font-weight: bold;
}

.privacy-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px;
}

.privacy-note a {
    color: var(--primary);
    text-decoration: underline;
}

/* Glassmorphism Card (Light) */
.form-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%);
    margin-left: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.form-grid-single {
    grid-template-columns: 1fr;
}

.full-width {
    grid-column: span 2;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.input-group label.required::after {
    content: "*";
    color: #e74c3c;
    margin-left: 2px;
}

.input-group input,
.input-group select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

/* Representative Toggle */
.rep-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.rep-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ddd;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

#representative_fields {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

#representative_fields.active {
    max-height: 500px;
    opacity: 1;
    margin-top: 10px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.6);
    filter: brightness(1.1);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    .form-card {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }
}

/* Custom placeholder */
::placeholder {
    color: #adb5bd;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
    user-select: none;
}

.radio-label:hover {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.04);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radio-label input[type="radio"]:checked~.radio-custom {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.08);
}

.radio-label input[type="radio"]:checked~.radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.06);
    font-weight: 500;
}

.note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.error-message {
    color: #d63031;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 6px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input.invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}

.footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadeIn 1.5s ease-out;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--input-bg);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    margin-top: 5px;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.04);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    pointer-events: none;
    text-align: center;
    padding: 20px;
}

.file-upload-content svg {
    color: var(--primary);
    opacity: 0.7;
}

.file-upload-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.file-name {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
