:root {
    --primary-color: #e57373;        /* 薄めの赤 */
    --secondary-color: #7986cb;      /* 薄めの青 */
    --success-color: #81c784;        /* 薄めの緑 */
    --warning-color: #ffb74d;        /* 薄めのオレンジ */
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --gradient-bg: linear-gradient(135deg, #f8f9ff 0%, #f1f5f9 50%, #e2e8f0 100%);
    --card-bg: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.7;
    padding: 20px 0;
    position: relative;
}

/* 背景装飾 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(173, 216, 230, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(221, 160, 221, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.register-container {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px var(--shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    position: relative;
}

.register-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--success-color), 
        var(--warning-color));
    border-radius: 22px;
    opacity: 0.1;
    z-index: -1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    opacity: 0.6;
}

.header h1 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header p {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 400;
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 25px;
}

.form-group {
    flex: 1;
    margin-bottom: 25px;
    position: relative;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.required {
    color: var(--primary-color);
    margin-left: 4px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(229, 115, 115, 0.1),
        0 4px 12px var(--shadow-light);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.form-group.error input,
.form-group.error select {
    border-color: var(--primary-color);
    background: rgba(229, 115, 115, 0.05);
}

.error-message {
    color: var(--primary-color);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message::before {
    content: '⚠';
    font-size: 12px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 55px;
}

.toggle-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 10;
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.password-strength {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
    font-weight: 500;
    border-left: 4px solid;
}

.strength-weak {
    background: linear-gradient(135deg, rgba(229, 115, 115, 0.1), rgba(239, 68, 68, 0.05));
    color: #c53030;
    border-left-color: var(--primary-color);
}

.strength-medium {
    background: linear-gradient(135deg, rgba(255, 183, 77, 0.1), rgba(245, 158, 11, 0.05));
    color: #d69e2e;
    border-left-color: var(--warning-color);
}

.strength-strong {
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.1), rgba(34, 197, 94, 0.05));
    color: #38a169;
    border-left-color: var(--success-color);
}

.address-type-selection {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.6));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.address-type-selection::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.address-type-selection:hover::before {
    left: 100%;
}

.address-type-selection label:first-child {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.radio-group {
    display: flex;
    gap: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.radio-option:hover {
    background: rgba(229, 115, 115, 0.05);
    transform: translateY(-1px);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-color);
}

.radio-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
}

.submit-btn {
    width: 100%;
    padding: 18px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 35px 0 25px 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 24px rgba(229, 115, 115, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

.submit-btn:disabled {
    background: linear-gradient(135deg, #cbd5e0, #a0aec0);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.message {
    padding: 18px 24px;
    border-radius: 14px;
    margin-bottom: 30px;
    font-weight: 500;
    position: relative;
    border-left: 4px solid;
}

.message.success {
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.1), rgba(34, 197, 94, 0.05));
    color: #2f855a;
    border-left-color: var(--success-color);
}

.message.error {
    background: linear-gradient(135deg, rgba(229, 115, 115, 0.1), rgba(239, 68, 68, 0.05));
    color: #c53030;
    border-left-color: var(--primary-color);
}

.message.info {
    background: linear-gradient(135deg, rgba(121, 134, 203, 0.1), rgba(99, 102, 241, 0.05));
    color: #1a7f49;//#5a67d8
    border-left-color: var(--secondary-color);
}

.duplicate-email-error {
    background: linear-gradient(135deg, rgba(229, 115, 115, 0.08), rgba(239, 68, 68, 0.03));
    border: 2px solid rgba(229, 115, 115, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.duplicate-email-error h3 {
    color: var(--primary-color);
    margin-bottom: 18px;
    font-size: 18px;
}

.error-actions {
    margin-top: 20px;
}

.error-actions p {
    margin: 15px 0 10px 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.action-link {
    display: inline-block;
    margin: 6px 12px 6px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.action-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s;
}

.action-link:hover::before {
    left: 100%;
}

.action-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(121, 134, 203, 0.3);
}

.action-link.secondary {
    background: linear-gradient(135deg, var(--medium-gray), #cbd5e0);
    color: var(--text-color);
}

.login-link {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(241, 245, 249, 0.4));
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.login-link a:hover {
    background: rgba(229, 115, 115, 0.1);
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.requirements {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8), rgba(219, 234, 254, 0.6));
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 35px;
    position: relative;
}

.requirements::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 8px;
    border-radius: 50%;
    font-size: 16px;
}

.requirements h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 18px;
    padding-left: 0;
}

.requirements ul {
    margin-left: 25px;
    color: #1e40af;
}

.requirements li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* 完了画面・認証画面用の追加スタイル */
.email-info {
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.08), rgba(34, 197, 94, 0.03));
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid rgba(129, 199, 132, 0.2);
}

.email-info h3 {
    color: var(--success-color);
    margin-bottom: 12px;
    font-size: 16px;
}

.email-address {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.next-steps,
.important-notice,
.welcome-message {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.6));
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid var(--border-color);
}

.next-steps h3,
.important-notice h3,
.welcome-message h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.next-steps ol,
.important-notice ul,
.welcome-message ul {
    margin-left: 25px;
    color: var(--text-color);
}

.next-steps li,
.important-notice li,
.welcome-message li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.user-info {
    background: linear-gradient(135deg, rgba(121, 134, 203, 0.08), rgba(99, 102, 241, 0.03));
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid rgba(121, 134, 203, 0.2);
}

.user-details p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.login-btn {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--success-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    margin: 20px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(129, 199, 132, 0.3);
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(241, 245, 249, 0.4));
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.navigation a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navigation a:hover {
    background: rgba(121, 134, 203, 0.1);
    transform: translateY(-1px);
}

/* FAQ セクション */
details {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.6));
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(248, 250, 252, 0.3));
}

summary:hover {
    background: rgba(121, 134, 203, 0.05);
}

details[open] summary {
    background: rgba(121, 134, 203, 0.1);
    border-bottom: 1px solid var(--border-color);
}

details p,
details ul {
    padding: 16px 20px;
    color: var(--text-color);
    line-height: 1.6;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .register-container {
        padding: 30px 20px;
        margin: 0 10px;
        border-radius: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .submit-btn {
        font-size: 16px;
        padding: 16px 0;
    }
}