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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.links-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.links-container a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.links-container a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* ========== 회원가입 ========== */
.signup-container {
    max-width: 450px;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: #27ae60;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.success-message.show {
    display: block;
}

.form-group input.error {
    border-color: #e74c3c;
}

.form-group input.success {
    border-color: #27ae60;
}

.back-to-login {
    text-align: center;
    margin-top: 15px;
}

.back-to-login a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.back-to-login a:hover {
    text-decoration: underline;
}

.password-requirements {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    padding-left: 5px;
}

.signup-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.signup-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.required-mark {
    color: #e74c3c;
    margin-left: 2px;
}

.id-check-wrap {
    display: flex;
    gap: 8px;
}

.id-check-wrap input {
    flex: 1;
}

.check-btn {
    padding: 10px 14px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.check-btn:hover {
    background: #5a6fd6;
}

/* ========== 커스텀 모달 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
}

.modal-icon.success {
    background: #e8f5e9;
    color: #27ae60;
}

.modal-icon.error {
    background: #fde8e8;
    color: #e74c3c;
}

.modal-icon.warning {
    background: #fff3e0;
    color: #f39c12;
}

.modal-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 24px;
    word-break: keep-all;
}

.modal-btn {
    padding: 10px 40px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.modal-btn.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.modal-btn.error {
    background: linear-gradient(135deg, #e74c3c, #ec7063);
}

.modal-btn.warning {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
