.login-container {
    min-height: 100vh;
    height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
}

/* 키보드가 올라왔을 때 컨테이너 조정 */
.login-container.keyboard-active {
    min-height: auto;
    height: auto;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-y: auto;
    position: relative;
    justify-content: flex-start;
}

/* 키보드가 올라왔을 때 appCapsule 조정 */
#appCapsule.keyboard-active {
    height: auto !important;
    min-height: auto !important;
}

#appCapsule {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 100vh !important;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, padding 0.3s ease;
}

/* 키보드가 올라왔을 때 카드 조정 */
.login-card.keyboard-active {
    transform: scale(0.95);
    padding: 30px 25px;
    margin: 10px 0;
}

/* 입력 필드 포커스 시 스크롤 보장 */
.form-control:focus {
    scroll-margin-top: 50px;
    scroll-margin-bottom: 50px;
}

/* 키보드 대응을 위한 추가 스타일 */
.form-control {
    scroll-margin-top: 50px;
    scroll-margin-bottom: 50px;
}

/* 모바일에서 키보드 대응 */
@media (max-height: 600px) {
    .login-container {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .login-card {
        transform: scale(0.9);
        padding: 25px 20px;
        margin: 5px 0;
    }
    
    .logo-section {
        margin-bottom: 20px;
    }
    
    .logo-section img {
        max-width: 140px;
    }
    
    .login-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* iOS Safari 키보드 대응 */
@supports (-webkit-touch-callout: none) {
    .login-container {
        /* iOS에서 키보드가 올라올 때 뷰포트 높이 조정 */
        min-height: -webkit-fill-available;
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-section:hover {
    transform: scale(1.02);
}

.logo-section img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

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

.input-wrapper {
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-control {
    border: none;
    background: transparent;
    padding: 14px 18px;
    font-size: 15px;
    color: #333;
    width: 100%;
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.clear-input {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.3s ease;
}

.clear-input:hover {
    color: #667eea;
}

.form-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.form-links a,
.form-links div {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
}

.form-links a:hover,
.form-links div:hover {
    color: #5a6fd8;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-links .divider {
    color: #dee2e6;
    font-weight: 400;
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 14px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    letter-spacing: 0.5px;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

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

/* 모달 스타일 */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
}

.modal-header {
    border-bottom: 1px solid #e9ecef !important;
    padding: 25px 30px 20px 30px !important;
    background: transparent !important;
}

.modal-title {
    font-weight: 700 !important;
    color: #2c3e50 !important;
    font-size: 20px !important;
    margin: 0 !important;
}

.modal-body {
    padding: 20px 30px 30px 30px !important;
}

.input-group-row {
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
}

.form-label {
    font-weight: 600 !important;
    color: #495057 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    display: block !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.input-default {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: #f8f9fa !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* 모달 내부 입력 필드 크기 조정 */
.modal .input-default {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 !important;
}

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

.modal-footer {
    padding: 20px 30px 25px 30px !important;
    border-top: 1px solid #e9ecef !important;
    background: white !important;
}

.btn-inline {
    display: flex !important;
    gap: 0 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    background: white !important;
}

.btn {
    padding: 10px 20px !important;
    border-radius: 0 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 70px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.btn-text-secondary {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border: 1px solid #dee2e6 !important;
}

.btn-text-secondary:hover {
    background: #e9ecef !important;
    color: #495057 !important;
    transform: translateY(-1px) !important;
}

/* 모달 배경 */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-dialog {
    max-width: 400px !important;
    margin: 1.75rem auto !important;
    width: 90% !important;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .form-links {
        gap: 10px;
    }
    
    .form-links a,
    .form-links div {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .logo-section img {
        max-width: 160px;
    }
    
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
        width: calc(100% - 2rem) !important;
    }
    
    .modal-header {
        padding: 20px 20px 15px 20px !important;
    }
    
    .modal-body {
        padding: 15px 20px 25px 20px !important;
    }
    
    .modal-footer {
        padding: 15px 20px 20px 20px !important;
    }
} 